<!doctype html><html lang="en">
 <head>
  <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport">
  <title>WebXR Test API</title>
<style data-fill-with="stylesheet">/******************************************************************************
 *                   Style sheet for the W3C specifications                   *
 *
 * Special classes handled by this style sheet include:
 *
 * Indices
 *   - .toc for the Table of Contents (<ol class="toc">)
 *     + <span class="secno"> for the section numbers
 *   - #toc for the Table of Contents (<nav id="toc">)
 *   - ul.index for Indices (<a href="#ref">term</a><span>, in §N.M</span>)
 *   - table.index for Index Tables (e.g. for properties or elements)
 *
 * Structural Markup
 *   - table.data for general data tables
 *     -> use 'scope' attribute, <colgroup>, <thead>, and <tbody> for best results !
 *     -> use <table class='complex data'> for extra-complex tables
 *     -> use <td class='long'> for paragraph-length cell content
 *     -> use <td class='pre'> when manual line breaks/indentation would help readability
 *   - dl.switch for switch statements
 *   - ol.algorithm for algorithms (helps to visualize nesting)
 *   - .figure and .caption (HTML4) and figure and figcaption (HTML5)
 *     -> .sidefigure for right-floated figures
 *   - ins/del
 *
 * Code
 *   - pre and code
 *
 * Special Sections
 *   - .note       for informative notes             (div, p, span, aside, details)
 *   - .example    for informative examples          (div, p, pre, span)
 *   - .issue      for issues                        (div, p, span)
 *   - .assertion  for assertions                    (div, p, span)
 *   - .advisement for loud normative statements     (div, p, strong)
 *   - .annoying-warning for spec obsoletion notices (div, aside, details)
 *
 * Definition Boxes
 *   - pre.def   for WebIDL definitions
 *   - table.def for tables that define other entities (e.g. CSS properties)
 *   - dl.def    for definition lists that define other entitles (e.g. HTML elements)
 *
 * Numbering
 *   - .secno for section numbers in .toc and headings (<span class='secno'>3.2</span>)
 *   - .marker for source-inserted example/figure/issue numbers (<span class='marker'>Issue 4</span>)
 *   - ::before styled for CSS-generated issue/example/figure numbers:
 *     -> Documents wishing to use this only need to add
 *        figcaption::before,
 *        .caption::before { content: "Figure "  counter(figure) " ";  }
 *        .example::before { content: "Example " counter(example) " "; }
 *        .issue::before   { content: "Issue "   counter(issue) " ";   }
 *
 * Header Stuff (ignore, just don't conflict with these classes)
 *   - .head for the header
 *   - .copyright for the copyright
 *
 * Miscellaneous
 *   - .overlarge for things that should be as wide as possible, even if
 *     that overflows the body text area. This can be used on an item or
 *     on its container, depending on the effect desired.
 *     Note that this styling basically doesn't help at all when printing,
 *     since A4 paper isn't much wider than the max-width here.
 *     It's better to design things to fit into a narrower measure if possible.
 *   - js-added ToC jump links (see fixup.js)
 *
 ******************************************************************************/

/******************************************************************************/
/*                                   Body                                     */
/******************************************************************************/

	body {
		counter-reset: example figure issue;

		/* Layout */
		max-width: 50em;               /* limit line length to 50em for readability   */
		margin: 0 auto;                /* center text within page                     */
		padding: 1.6em 1.5em 2em 50px; /* assume 16px font size for downlevel clients */
		padding: 1.6em 1.5em 2em calc(26px + 1.5em); /* leave space for status flag     */

		/* Typography */
		line-height: 1.5;
		font-family: sans-serif;
		widows: 2;
		orphans: 2;
		word-wrap: break-word;
		overflow-wrap: break-word;
		hyphens: auto;

		/* Colors */
		color: black;
		background: white top left fixed no-repeat;
		background-size: 25px auto;
	}


/******************************************************************************/
/*                         Front Matter & Navigation                          */
/******************************************************************************/

/** Header ********************************************************************/

	div.head { margin-bottom: 1em }
	div.head hr { border-style: solid; }

	div.head h1 {
		font-weight: bold;
		margin: 0 0 .1em;
		font-size: 220%;
	}

	div.head h2 { margin-bottom: 1.5em;}

/** W3C Logo ******************************************************************/

	.head .logo {
		float: right;
		margin: 0.4rem 0 0.2rem .4rem;
	}

	.head img[src*="logos/W3C"] {
		display: block;
		border: solid #1a5e9a;
		border-width: .65rem .7rem .6rem;
		border-radius: .4rem;
		background: #1a5e9a;
		color: white;
		font-weight: bold;
	}

	.head a:hover > img[src*="logos/W3C"],
	.head a:focus > img[src*="logos/W3C"] {
		opacity: .8;
	}

	.head a:active > img[src*="logos/W3C"] {
		background: #c00;
		border-color: #c00;
	}

	/* see also additional rules in Link Styling section */

/** Copyright *****************************************************************/

	p.copyright,
	p.copyright small { font-size: small }

/** Back to Top / ToC Toggle **************************************************/

	@media print {
		#toc-nav {
			display: none;
		}
	}
	@media not print {
		#toc-nav {
			position: fixed;
			z-index: 2;
			bottom: 0; left: 0;
			margin: 0;
			min-width: 1.33em;
			border-top-right-radius: 2rem;
			box-shadow: 0 0 2px;
			font-size: 1.5em;
			color: black;
		}
		#toc-nav > a {
			display: block;
			white-space: nowrap;

			height: 1.33em;
			padding: .1em 0.3em;
			margin: 0;

			background: white;
			box-shadow: 0 0 2px;
			border: none;
			border-top-right-radius: 1.33em;
			background: white;
		}
		#toc-nav > #toc-jump {
			padding-bottom: 2em;
			margin-bottom: -1.9em;
		}

		#toc-nav > a:hover,
		#toc-nav > a:focus {
			background: #f8f8f8;
		}
		#toc-nav > a:not(:hover):not(:focus) {
			color: #707070;
		}

		/* statusbar gets in the way on keyboard focus; remove once browsers fix */
		#toc-nav > a[href="#toc"]:not(:hover):focus:last-child {
			padding-bottom: 1.5rem;
		}

		#toc-nav:not(:hover) > a:not(:focus) > span + span {
			/* Ideally this uses :focus-within on #toc-nav */
			display: none;
		}
		#toc-nav > a > span + span {
			padding-right: 0.2em;
		}

		#toc-toggle-inline {
			vertical-align: 0.05em;
			font-size: 80%;
			color: gray;
			color: hsla(203,20%,40%,.7);
			border-style: none;
			background: transparent;
			position: relative;
		}
		#toc-toggle-inline:hover:not(:active),
		#toc-toggle-inline:focus:not(:active) {
			text-shadow: 1px 1px silver;
			top: -1px;
			left: -1px;
		}

		#toc-nav :active {
			color: #C00;
		}
	}

/** ToC Sidebar ***************************************************************/

	/* Floating sidebar */
	@media screen {
		body.toc-sidebar #toc {
			position: fixed;
			top: 0; bottom: 0;
			left: 0;
			width: 23.5em;
			max-width: 80%;
			max-width: calc(100% - 2em - 26px);
			overflow: auto;
			padding: 0 1em;
			padding-left: 42px;
			padding-left: calc(1em + 26px);
			background: inherit;
			background-color: #f7f8f9;
			z-index: 1;
			box-shadow: -.1em 0 .25em rgba(0,0,0,.1) inset;
		}
		body.toc-sidebar #toc h2 {
			margin-top: .8rem;
			font-variant: small-caps;
			font-variant: all-small-caps;
			text-transform: lowercase;
			font-weight: bold;
			color: gray;
			color: hsla(203,20%,40%,.7);
		}
		body.toc-sidebar #toc-jump:not(:focus) {
			width: 0;
			height: 0;
			padding: 0;
			position: absolute;
			overflow: hidden;
		}
	}
	/* Hide main scroller when only the ToC is visible anyway */
	@media screen and (max-width: 28em) {
		body.toc-sidebar {
			overflow: hidden;
		}
	}

	/* Sidebar with its own space */
	@media screen and (min-width: 78em) {
		body:not(.toc-inline) #toc {
			position: fixed;
			top: 0; bottom: 0;
			left: 0;
			width: 23.5em;
			overflow: auto;
			padding: 0 1em;
			padding-left: 42px;
			padding-left: calc(1em + 26px);
			background: inherit;
			background-color: #f7f8f9;
			z-index: 1;
			box-shadow: -.1em 0 .25em rgba(0,0,0,.1) inset;
		}
		body:not(.toc-inline) #toc h2 {
			margin-top: .8rem;
			font-variant: small-caps;
			font-variant: all-small-caps;
			text-transform: lowercase;
			font-weight: bold;
			color: gray;
			color: hsla(203,20%,40%,.7);
		}

		body:not(.toc-inline) {
			padding-left: 29em;
		}
		/* See also Overflow section at the bottom */

		body:not(.toc-inline) #toc-jump:not(:focus) {
			width: 0;
			height: 0;
			padding: 0;
			position: absolute;
			overflow: hidden;
		}
	}
	@media screen and (min-width: 90em) {
		body:not(.toc-inline) {
			margin: 0 4em;
		}
	}

/******************************************************************************/
/*                                Sectioning                                  */
/******************************************************************************/

/** Headings ******************************************************************/

	h1, h2, h3, h4, h5, h6, dt {
		page-break-after: avoid;
		page-break-inside: avoid;
		font: 100% sans-serif;   /* Reset all font styling to clear out UA styles */
		font-family: inherit;    /* Inherit the font family. */
		line-height: 1.2;        /* Keep wrapped headings compact */
		hyphens: manual;         /* Hyphenated headings look weird */
	}

	h2, h3, h4, h5, h6 {
		margin-top: 3rem;
	}

	h1, h2, h3 {
		color: #005A9C;
		background: transparent;
	}

	h1 { font-size: 170%; }
	h2 { font-size: 140%; }
	h3 { font-size: 120%; }
	h4 { font-weight: bold; }
	h5 { font-style: italic; }
	h6 { font-variant: small-caps; }
	dt { font-weight: bold; }

/** Subheadings ***************************************************************/

	h1 + h2,
	#subtitle {
		/* #subtitle is a subtitle in an H2 under the H1 */
		margin-top: 0;
	}
	h2 + h3,
	h3 + h4,
	h4 + h5,
	h5 + h6 {
		margin-top: 1.2em; /* = 1 x line-height */
	}

/** Section divider ***********************************************************/

	:not(.head) > hr {
		font-size: 1.5em;
		text-align: center;
		margin: 1em auto;
		height: auto;
		border: transparent solid 0;
		background: transparent;
	}
	:not(.head) > hr::before {
		content: "\2727\2003\2003\2727\2003\2003\2727";
	}

/******************************************************************************/
/*                            Paragraphs and Lists                            */
/******************************************************************************/

	p {
		margin: 1em 0;
	}

	dd > p:first-child,
	li > p:first-child {
		margin-top: 0;
	}

	ul, ol {
		margin-left: 0;
		padding-left: 2em;
	}

	li {
		margin: 0.25em 0 0.5em;
		padding: 0;
	}

	dl dd {
		margin: 0 0 .5em 2em;
	}

	.head dd + dd { /* compact for header */
		margin-top: -.5em;
	}

	/* Style for algorithms */
	ol.algorithm ol:not(.algorithm),
	.algorithm > ol ol:not(.algorithm) {
	 border-left: 0.5em solid #DEF;
	}

	/* Put nice boxes around each algorithm. */
	[data-algorithm]:not(.heading) {
	  padding: .5em;
	  border: thin solid #ddd; border-radius: .5em;
	  margin: .5em calc(-0.5em - 1px);
	}
	[data-algorithm]:not(.heading) > :first-child {
	  margin-top: 0;
	}
	[data-algorithm]:not(.heading) > :last-child {
	  margin-bottom: 0;
	}

	/* Style for switch/case <dl>s */
	dl.switch > dd > ol.only,
	dl.switch > dd > .only > ol {
	 margin-left: 0;
	}
	dl.switch > dd > ol.algorithm,
	dl.switch > dd > .algorithm > ol {
	 margin-left: -2em;
	}
	dl.switch {
	 padding-left: 2em;
	}
	dl.switch > dt {
	 text-indent: -1.5em;
	 margin-top: 1em;
	}
	dl.switch > dt + dt {
	 margin-top: 0;
	}
	dl.switch > dt::before {
	 content: '\21AA';
	 padding: 0 0.5em 0 0;
	 display: inline-block;
	 width: 1em;
	 text-align: right;
	 line-height: 0.5em;
	}

/** Terminology Markup ********************************************************/


/******************************************************************************/
/*                                 Inline Markup                              */
/******************************************************************************/

/** Terminology Markup ********************************************************/
	dfn   { /* Defining instance */
		font-weight: bolder;
	}
	a > i { /* Instance of term */
		font-style: normal;
	}
	dt dfn code, code.idl {
		font-size: medium;
	}
	dfn var {
		font-style: normal;
	}

/** Change Marking ************************************************************/

	del { color: red;  text-decoration: line-through; }
	ins { color: #080; text-decoration: underline;    }

/** Miscellaneous improvements to inline formatting ***************************/

	sup {
		vertical-align: super;
		font-size: 80%
	}

/******************************************************************************/
/*                                    Code                                    */
/******************************************************************************/

/** General monospace/pre rules ***********************************************/

	pre, code, samp {
		font-family: Menlo, Consolas, "DejaVu Sans Mono", Monaco, monospace;
		font-size: .9em;
		page-break-inside: avoid;
		hyphens: none;
		text-transform: none;
	}
	pre code,
	code code {
		font-size: 100%;
	}

	pre {
		margin-top: 1em;
		margin-bottom: 1em;
		overflow: auto;
	}

/** Inline Code fragments *****************************************************/

  /* Do something nice. */

/******************************************************************************/
/*                                    Links                                   */
/******************************************************************************/

/** General Hyperlinks ********************************************************/

	/* We hyperlink a lot, so make it less intrusive */
	a[href] {
		color: #034575;
		text-decoration: none;
		border-bottom: 1px solid #707070;
		/* Need a bit of extending for it to look okay */
		padding: 0 1px 0;
		margin: 0 -1px 0;
	}
	a:visited {
		border-bottom-color: #BBB;
	}

	/* Use distinguishing colors when user is interacting with the link */
	a[href]:focus,
	a[href]:hover {
		background: #f8f8f8;
		background: rgba(75%, 75%, 75%, .25);
		border-bottom-width: 3px;
		margin-bottom: -2px;
	}
	a[href]:active {
		color: #C00;
		border-color: #C00;
	}

	/* Backout above styling for W3C logo */
	.head .logo,
	.head .logo a {
		border: none;
		text-decoration: none;
		background: transparent;
	}

/******************************************************************************/
/*                                    Images                                  */
/******************************************************************************/

	img {
		border-style: none;
	}

	/* For autogen numbers, add
	   .caption::before, figcaption::before { content: "Figure " counter(figure) ". "; }
	*/

	figure, .figure, .sidefigure {
		page-break-inside: avoid;
		text-align: center;
		margin: 2.5em 0;
	}
	.figure img,    .sidefigure img,    figure img,
	.figure object, .sidefigure object, figure object {
		max-width: 100%;
		margin: auto;
	}
	.figure pre, .sidefigure pre, figure pre {
		text-align: left;
		display: table;
		margin: 1em auto;
	}
	.figure table, figure table {
		margin: auto;
	}
	@media screen and (min-width: 20em) {
		.sidefigure {
			float: right;
			width: 50%;
			margin: 0 0 0.5em 0.5em
		}
	}
	.caption, figcaption, caption {
		font-style: italic;
		font-size: 90%;
	}
	.caption::before, figcaption::before, figcaption > .marker {
		font-weight: bold;
	}
	.caption, figcaption {
		counter-increment: figure;
	}

	/* DL list is indented 2em, but figure inside it is not */
	dd > .figure, dd > figure { margin-left: -2em }

/******************************************************************************/
/*                             Colored Boxes                                  */
/******************************************************************************/

	.issue, .note, .example, .assertion, .advisement, blockquote {
		padding: .5em;
		border: .5em;
		border-left-style: solid;
		page-break-inside: avoid;
	}
	span.issue, span.note {
		padding: .1em .5em .15em;
		border-right-style: solid;
	}

	.issue,
	.note,
	.example,
	.advisement,
	.assertion,
	blockquote {
		margin: 1em auto;
	}
	.note  > p:first-child,
	.issue > p:first-child,
	blockquote > :first-child {
		margin-top: 0;
	}
	blockquote > :last-child {
		margin-bottom: 0;
	}

/** Blockquotes ***************************************************************/

	blockquote {
		border-color: silver;
	}

/** Open issue ****************************************************************/

	.issue {
		border-color: #E05252;
		background: #FBE9E9;
		counter-increment: issue;
		overflow: auto;
	}
	.issue::before, .issue > .marker {
		text-transform: uppercase;
		color: #AE1E1E;
		padding-right: 1em;
		text-transform: uppercase;
	}
	/* Add .issue::before { content: "Issue " counter(issue) " "; } for autogen numbers,
	   or use class="marker" to mark up the issue number in source. */

/** Example *******************************************************************/

	.example {
		border-color: #E0CB52;
		background: #FCFAEE;
		counter-increment: example;
		overflow: auto;
		clear: both;
	}
	.example::before, .example > .marker {
		text-transform: uppercase;
		color: #827017;
		min-width: 7.5em;
		display: block;
	}
	/* Add .example::before { content: "Example " counter(example) " "; } for autogen numbers,
	   or use class="marker" to mark up the example number in source. */

/** Non-normative Note ********************************************************/

	.note {
		border-color: #52E052;
		background: #E9FBE9;
		overflow: auto;
	}

	.note::before, .note > .marker,
	details.note > summary::before,
	details.note > summary > .marker {
		text-transform: uppercase;
		display: block;
		color: hsl(120, 70%, 30%);
	}
	/* Add .note::before { content: "Note"; } for autogen label,
	   or use class="marker" to mark up the label in source. */

	details.note > summary {
		display: block;
		color: hsl(120, 70%, 30%);
	}
	details.note[open] > summary {
		border-bottom: 1px silver solid;
	}

/** Assertion Box *************************************************************/
	/*  for assertions in algorithms */

	.assertion {
		border-color: #AAA;
		background: #EEE;
	}

/** Advisement Box ************************************************************/
	/*  for attention-grabbing normative statements */

	.advisement {
		border-color: orange;
		border-style: none solid;
		background: #FFEECC;
	}
	strong.advisement {
		display: block;
		text-align: center;
	}
	.advisement > .marker {
		color: #B35F00;
	}

/** Spec Obsoletion Notice ****************************************************/
	/* obnoxious obsoletion notice for older/abandoned specs. */

	details {
		display: block;
	}
	summary {
		font-weight: bolder;
	}

	.annoying-warning:not(details),
	details.annoying-warning:not([open]) > summary,
	details.annoying-warning[open] {
		background: #fdd;
		color: red;
		font-weight: bold;
		padding: .75em 1em;
		border: thick red;
		border-style: solid;
		border-radius: 1em;
	}
	.annoying-warning :last-child {
		margin-bottom: 0;
	}

@media not print {
	details.annoying-warning[open] {
		position: fixed;
		left: 1em;
		right: 1em;
		bottom: 1em;
		z-index: 1000;
	}
}

	details.annoying-warning:not([open]) > summary {
		text-align: center;
	}

/** Entity Definition Boxes ***************************************************/

	.def {
		padding: .5em 1em;
		background: #DEF;
		margin: 1.2em 0;
		border-left: 0.5em solid #8CCBF2;
	}

/******************************************************************************/
/*                                    Tables                                  */
/******************************************************************************/

	th, td {
		text-align: left;
		text-align: start;
	}

/** Property/Descriptor Definition Tables *************************************/

	table.def {
		/* inherits .def box styling, see above */
		width: 100%;
		border-spacing: 0;
	}

	table.def td,
	table.def th {
		padding: 0.5em;
		vertical-align: baseline;
		border-bottom: 1px solid #bbd7e9;
	}

	table.def > tbody > tr:last-child th,
	table.def > tbody > tr:last-child td {
		border-bottom: 0;
	}

	table.def th {
		font-style: italic;
		font-weight: normal;
		padding-left: 1em;
		width: 3em;
	}

	/* For when values are extra-complex and need formatting for readability */
	table td.pre {
		white-space: pre-wrap;
	}

	/* A footnote at the bottom of a def table */
	table.def           td.footnote {
		padding-top: 0.6em;
	}
	table.def           td.footnote::before {
		content: " ";
		display: block;
		height: 0.6em;
		width: 4em;
		border-top: thin solid;
	}

/** Data tables (and properly marked-up index tables) *************************/
	/*
		 <table class="data"> highlights structural relationships in a table
		 when correct markup is used (e.g. thead/tbody, th vs. td, scope attribute)

		 Use class="complex data" for particularly complicated tables --
		 (This will draw more lines: busier, but clearer.)

		 Use class="long" on table cells with paragraph-like contents
		 (This will adjust text alignment accordingly.)
		 Alternately use class="longlastcol" on tables, to have the last column assume "long".
	*/

	table {
		word-wrap: normal;
		overflow-wrap: normal;
		hyphens: manual;
	}

	table.data,
	table.index {
		margin: 1em auto;
		border-collapse: collapse;
		border: hidden;
		width: 100%;
	}
	table.data caption,
	table.index caption {
		max-width: 50em;
		margin: 0 auto 1em;
	}

	table.data td,  table.data th,
	table.index td, table.index th {
		padding: 0.5em 1em;
		border-width: 1px;
		border-color: silver;
		border-top-style: solid;
	}

	table.data thead td:empty {
		padding: 0;
		border: 0;
	}

	table.data  thead,
	table.index thead,
	table.data  tbody,
	table.index tbody {
		border-bottom: 2px solid;
	}

	table.data colgroup,
	table.index colgroup {
		border-left: 2px solid;
	}

	table.data  tbody th:first-child,
	table.index tbody th:first-child  {
		border-right: 2px solid;
		border-top: 1px solid silver;
		padding-right: 1em;
	}

	table.data th[colspan],
	table.data td[colspan] {
		text-align: center;
	}

	table.complex.data th,
	table.complex.data td {
		border: 1px solid silver;
		text-align: center;
	}

	table.data.longlastcol td:last-child,
	table.data td.long {
	 vertical-align: baseline;
	 text-align: left;
	}

	table.data img {
		vertical-align: middle;
	}


/*
Alternate table alignment rules

	table.data,
	table.index {
		text-align: center;
	}

	table.data  thead th[scope="row"],
	table.index thead th[scope="row"] {
		text-align: right;
	}

	table.data  tbody th:first-child,
	table.index tbody th:first-child  {
		text-align: right;
	}

Possible extra rowspan handling

	table.data  tbody th[rowspan]:not([rowspan='1']),
	table.index tbody th[rowspan]:not([rowspan='1']),
	table.data  tbody td[rowspan]:not([rowspan='1']),
	table.index tbody td[rowspan]:not([rowspan='1']) {
		border-left: 1px solid silver;
	}

	table.data  tbody th[rowspan]:first-child,
	table.index tbody th[rowspan]:first-child,
	table.data  tbody td[rowspan]:first-child,
	table.index tbody td[rowspan]:first-child{
		border-left: 0;
		border-right: 1px solid silver;
	}
*/

/******************************************************************************/
/*                                  Indices                                   */
/******************************************************************************/


/** Table of Contents *********************************************************/

	.toc a {
		/* More spacing; use padding to make it part of the click target. */
		padding-top: 0.1rem;
		/* Larger, more consistently-sized click target */
		display: block;
		/* Reverse color scheme */
		color: black;
		border-color: #3980B5;
		border-bottom-width: 3px !important;
		margin-bottom: 0px !important;
	}
	.toc a:visited {
		border-color: #054572;
	}
	.toc a:not(:focus):not(:hover) {
		/* Allow colors to cascade through from link styling */
		border-bottom-color: transparent;
	}

	.toc, .toc ol, .toc ul, .toc li {
		list-style: none; /* Numbers must be inlined into source */
		/* because generated content isn't search/selectable and markers can't do multilevel yet */
		margin:  0;
		padding: 0;
		line-height: 1.1rem; /* consistent spacing */
	}

	/* ToC not indented until third level, but font style & margins show hierarchy */
	.toc > li             { font-weight: bold;   }
	.toc > li li          { font-weight: normal; }
	.toc > li li li       { font-size:   95%;    }
	.toc > li li li li    { font-size:   90%;    }
	.toc > li li li li .secno { font-size: 85%; }
	.toc > li li li li li { font-size:   85%;    }
	.toc > li li li li li .secno { font-size: 100%; }

	/* @supports not (display:grid) { */
		.toc > li             { margin: 1.5rem 0;    }
		.toc > li li          { margin: 0.3rem 0;    }
		.toc > li li li       { margin-left: 2rem;   }

		/* Section numbers in a column of their own */
		.toc .secno {
			float: left;
			width: 4rem;
			white-space: nowrap;
		}

		.toc li {
			clear: both;
		}

		:not(li) > .toc              { margin-left:  5rem; }
		.toc .secno                  { margin-left: -5rem; }
		.toc > li li li .secno       { margin-left: -7rem; }
		.toc > li li li li .secno    { margin-left: -9rem; }
		.toc > li li li li li .secno { margin-left: -11rem; }

		/* Tighten up indentation in narrow ToCs */
		@media (max-width: 30em) {
			:not(li) > .toc              { margin-left:  4rem; }
			.toc .secno                  { margin-left: -4rem; }
			.toc > li li li              { margin-left:  1rem; }
			.toc > li li li .secno       { margin-left: -5rem; }
			.toc > li li li li .secno    { margin-left: -6rem; }
			.toc > li li li li li .secno { margin-left: -7rem; }
		}
	/* } */

	@supports (display:grid) and (display:contents) {
		/* Use #toc over .toc to override non-@supports rules. */
		#toc {
			display: grid;
			align-content: start;
			grid-template-columns: auto 1fr;
			grid-column-gap: 1rem;
			column-gap: 1rem;
			grid-row-gap: .6rem;
			row-gap: .6rem;
		}
		#toc h2 {
			grid-column: 1 / -1;
			margin-bottom: 0;
		}
		#toc ol,
		#toc li,
		#toc a {
			display: contents;
			/* Switch <a> to subgrid when supported */
		}
		#toc span {
			margin: 0;
		}
		#toc > .toc > li > a > span {
			/* The spans of the top-level list,
			   comprising the first items of each top-level section. */
			margin-top: 1.1rem;
		}
		#toc#toc .secno { /* Ugh, need more specificity to override base.css */
			grid-column: 1;
			width: auto;
			margin-left: 0;
		}
		#toc .content {
			grid-column: 2;
			width: auto;
			margin-right: 1rem;
		}
		#toc .content:hover {
			background: rgba(75%, 75%, 75%, .25);
			border-bottom: 3px solid #054572;
			margin-bottom: -3px;
		}
		#toc li li li .content {
			margin-left: 1rem;
		}
		#toc li li li li .content {
			margin-left: 2rem;
		}
	}


/** Index *********************************************************************/

	/* Index Lists: Layout */
	ul.index       { margin-left: 0; columns: 15em; text-indent: 1em hanging; }
	ul.index li    { margin-left: 0; list-style: none; break-inside: avoid; }
	ul.index li li { margin-left: 1em }
	ul.index dl    { margin-top: 0; }
	ul.index dt    { margin: .2em 0 .2em 20px;}
	ul.index dd    { margin: .2em 0 .2em 40px;}
	/* Index Lists: Typography */
	ul.index ul,
	ul.index dl { font-size: smaller; }
	@media not print {
		ul.index li span {
			white-space: nowrap;
			color: transparent; }
		ul.index li a:hover + span,
		ul.index li a:focus + span {
			color: #707070;
		}
	}

/** Index Tables *****************************************************/
	/* See also the data table styling section, which this effectively subclasses */

	table.index {
		font-size: small;
		border-collapse: collapse;
		border-spacing: 0;
		text-align: left;
		margin: 1em 0;
	}

	table.index td,
	table.index th {
		padding: 0.4em;
	}

	table.index tr:hover td:not([rowspan]),
	table.index tr:hover th:not([rowspan]) {
		background: #f7f8f9;
	}

	/* The link in the first column in the property table (formerly a TD) */
	table.index th:first-child a {
		font-weight: bold;
	}

/******************************************************************************/
/*                                    Print                                   */
/******************************************************************************/

	@media print {
		/* Pages have their own margins. */
		html {
			margin: 0;
		}
		/* Serif for print. */
		body {
			font-family: serif;
		}
	}
	@page {
		margin: 1.5cm 1.1cm;
	}

/******************************************************************************/
/*                                    Legacy                                  */
/******************************************************************************/

	/* This rule is inherited from past style sheets. No idea what it's for. */
	.hide { display: none }



/******************************************************************************/
/*                             Overflow Control                               */
/******************************************************************************/

	.figure .caption, .sidefigure .caption, figcaption {
		/* in case figure is overlarge, limit caption to 50em */
		max-width: 50rem;
		margin-left: auto;
		margin-right: auto;
	}
	.overlarge {
		/* Magic to create good table positioning:
		   "content column" is 50ems wide at max; less on smaller screens.
		   Extra space (after ToC + content) is empty on the right.

		   1. When table < content column, centers table in column.
		   2. When content < table < available, left-aligns.
		   3. When table > available, fills available + scroll bar.
		*/ 
		display: grid;
		grid-template-columns: minmax(0, 50em);
	}
	.overlarge > table {
		/* limit preferred width of table */
		max-width: 50em;
		margin-left: auto;
		margin-right: auto;
	}

	@media (min-width: 55em) {
		.overlarge {
			margin-right: calc(13px + 26.5rem - 50vw);
			max-width: none;
		}
	}
	@media screen and (min-width: 78em) {
		body:not(.toc-inline) .overlarge {
			/* 30.5em body padding 50em content area */
			margin-right: calc(40em - 50vw) !important;
		}
	}
	@media screen and (min-width: 90em) {
		body:not(.toc-inline) .overlarge {
			/* 4em html margin 30.5em body padding 50em content area */
			margin-right: calc(84.5em - 100vw) !important;
		}
	}

	@media not print {
		.overlarge {
			overflow-x: auto;
			/* See Lea Verou's explanation background-attachment:
			 * http://lea.verou.me/2012/04/background-attachment-local/
			 *
			background: top left  / 4em 100% linear-gradient(to right,  #ffffff, rgba(255, 255, 255, 0)) local,
			            top right / 4em 100% linear-gradient(to left, #ffffff, rgba(255, 255, 255, 0)) local,
			            top left  / 1em 100% linear-gradient(to right,  #c3c3c5, rgba(195, 195, 197, 0)) scroll,
			            top right / 1em 100% linear-gradient(to left, #c3c3c5, rgba(195, 195, 197, 0)) scroll,
			            white;
			background-repeat: no-repeat;
			*/
		}
	}
</style>
  <link href="https://www.w3.org/StyleSheets/TR/2016/W3C-ED" rel="stylesheet" type="text/css">
  <link href="https://immersive-web.github.io/webxr-test-api/" rel="canonical">
  <link href="favicon-32x32.png" rel="icon" sizes="32x32" type="image/png">
  <link href="favicon-96x96.png" rel="icon" sizes="96x96" type="image/png">
<style>
<style>
  .unstable::before {
    content: "This section is not stable";
    display: block;
    font-weight: bold;
    text-align: right;
    color: red;
  }
  .unstable {
    border: thin solid pink;
    border-radius: .5em;
    padding: .5em;
    margin: .5em calc(-0.5em - 1px);
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='290'><text transform='rotate(-45)' text-anchor='middle' font-family='sans-serif' font-weight='bold' font-size='70' y='210' opacity='.1'>Unstable</text></svg>");
    background-repeat: repeat;
    background-color: #FFF4F4;
  }
  .unstable h3:first-of-type {
    margin-top: 0.5rem;
  }

  .unstable.example:not(.no-marker)::before {
    content: "Example " counter(example) " (Unstable)";
    float: none;
  }

  .non-normative::before {
    content: "This section is non-normative.";
    font-style: italic;
  }
  .tg {
    border-collapse: collapse;
    border-spacing: 0;
  }
  .tg th {
    border-style: solid;
    border-width: 1px;
    background: #90b8de;
    color: #fff;
    font-family: sans-serif;
    font-weight: bold;
    border-color: grey;
  }
  .tg td {
    padding: 4px 5px;
    background-color: rgb(221, 238, 255);
    font-family: monospace;
    border-style: solid;
    border-width: 1px;
    border-color: grey;
    overflow: hidden;
    word-break: normal;
  }
</style>
<style>/* style-md-lists */

/* This is a weird hack for me not yet following the commonmark spec
   regarding paragraph and lists. */
[data-md] > :first-child {
    margin-top: 0;
}
[data-md] > :last-child {
    margin-bottom: 0;
}</style>
<style>/* style-selflinks */

.heading, .issue, .note, .example, li, dt {
    position: relative;
}
a.self-link {
    position: absolute;
    top: 0;
    left: calc(-1 * (3.5rem - 26px));
    width: calc(3.5rem - 26px);
    height: 2em;
    text-align: center;
    border: none;
    transition: opacity .2s;
    opacity: .5;
}
a.self-link:hover {
    opacity: 1;
}
.heading > a.self-link {
    font-size: 83%;
}
li > a.self-link {
    left: calc(-1 * (3.5rem - 26px) - 2em);
}
dfn > a.self-link {
    top: auto;
    left: auto;
    opacity: 0;
    width: 1.5em;
    height: 1.5em;
    background: gray;
    color: white;
    font-style: normal;
    transition: opacity .2s, background-color .2s, color .2s;
}
dfn:hover > a.self-link {
    opacity: 1;
}
dfn > a.self-link:hover {
    color: black;
}

a.self-link::before            { content: "¶"; }
.heading > a.self-link::before { content: "§"; }
dfn > a.self-link::before      { content: "#"; }</style>
<style>/* style-counters */

body {
    counter-reset: example figure issue;
}
.issue {
    counter-increment: issue;
}
.issue:not(.no-marker)::before {
    content: "Issue " counter(issue);
}

.example {
    counter-increment: example;
}
.example:not(.no-marker)::before {
    content: "Example " counter(example);
}
.invalid.example:not(.no-marker)::before,
.illegal.example:not(.no-marker)::before {
    content: "Invalid Example" counter(example);
}

figcaption {
    counter-increment: figure;
}
figcaption:not(.no-marker)::before {
    content: "Figure " counter(figure) " ";
}</style>
<style>/* style-var-click-highlighting */

    var { cursor: pointer; }
    var.selected0 { background-color: #F4D200; box-shadow: 0 0 0 2px #F4D200; }
    var.selected1 { background-color: #FF87A2; box-shadow: 0 0 0 2px #FF87A2; }
    var.selected2 { background-color: #96E885; box-shadow: 0 0 0 2px #96E885; }
    var.selected3 { background-color: #3EEED2; box-shadow: 0 0 0 2px #3EEED2; }
    var.selected4 { background-color: #EACFB6; box-shadow: 0 0 0 2px #EACFB6; }
    var.selected5 { background-color: #82DDFF; box-shadow: 0 0 0 2px #82DDFF; }
    var.selected6 { background-color: #FFBCF2; box-shadow: 0 0 0 2px #FFBCF2; }
    </style>
<style>/* style-autolinks */

.css.css, .property.property, .descriptor.descriptor {
    color: #005a9c;
    font-size: inherit;
    font-family: inherit;
}
.css::before, .property::before, .descriptor::before {
    content: "‘";
}
.css::after, .property::after, .descriptor::after {
    content: "’";
}
.property, .descriptor {
    /* Don't wrap property and descriptor names */
    white-space: nowrap;
}
.type { /* CSS value <type> */
    font-style: italic;
}
pre .property::before, pre .property::after {
    content: "";
}
[data-link-type="property"]::before,
[data-link-type="propdesc"]::before,
[data-link-type="descriptor"]::before,
[data-link-type="value"]::before,
[data-link-type="function"]::before,
[data-link-type="at-rule"]::before,
[data-link-type="selector"]::before,
[data-link-type="maybe"]::before {
    content: "‘";
}
[data-link-type="property"]::after,
[data-link-type="propdesc"]::after,
[data-link-type="descriptor"]::after,
[data-link-type="value"]::after,
[data-link-type="function"]::after,
[data-link-type="at-rule"]::after,
[data-link-type="selector"]::after,
[data-link-type="maybe"]::after {
    content: "’";
}

[data-link-type].production::before,
[data-link-type].production::after,
.prod [data-link-type]::before,
.prod [data-link-type]::after {
    content: "";
}

[data-link-type=element],
[data-link-type=element-attr] {
    font-family: Menlo, Consolas, "DejaVu Sans Mono", monospace;
    font-size: .9em;
}
[data-link-type=element]::before { content: "<" }
[data-link-type=element]::after  { content: ">" }

[data-link-type=biblio] {
    white-space: pre;
}</style>
<style>/* style-dfn-panel */

.dfn-panel {
    position: absolute;
    z-index: 35;
    height: auto;
    width: -webkit-fit-content;
    width: fit-content;
    max-width: 300px;
    max-height: 500px;
    overflow: auto;
    padding: 0.5em 0.75em;
    font: small Helvetica Neue, sans-serif, Droid Sans Fallback;
    background: #DDDDDD;
    color: black;
    border: outset 0.2em;
}
.dfn-panel:not(.on) { display: none; }
.dfn-panel * { margin: 0; padding: 0; text-indent: 0; }
.dfn-panel > b { display: block; }
.dfn-panel a { color: black; }
.dfn-panel a:not(:hover) { text-decoration: none !important; border-bottom: none !important; }
.dfn-panel > b + b { margin-top: 0.25em; }
.dfn-panel ul { padding: 0; }
.dfn-panel li { list-style: inside; }
.dfn-panel.activated {
    display: inline-block;
    position: fixed;
    left: .5em;
    bottom: 2em;
    margin: 0 auto;
    max-width: calc(100vw - 1.5em - .4em - .5em);
    max-height: 30vh;
}

.dfn-paneled { cursor: pointer; }
</style>
<style>/* style-syntax-highlighting */
pre.idl.highlight { color: #708090; }
.highlight:not(.idl) { background: hsl(24, 20%, 95%); }
code.highlight { padding: .1em; border-radius: .3em; }
pre.highlight, pre > code.highlight { display: block; padding: 1em; margin: .5em 0; overflow: auto; border-radius: 0; }
c-[a] { color: #990055 } /* Keyword.Declaration */
c-[b] { color: #990055 } /* Keyword.Type */
c-[c] { color: #708090 } /* Comment */
c-[d] { color: #708090 } /* Comment.Multiline */
c-[e] { color: #0077aa } /* Name.Attribute */
c-[f] { color: #669900 } /* Name.Tag */
c-[g] { color: #222222 } /* Name.Variable */
c-[k] { color: #990055 } /* Keyword */
c-[l] { color: #000000 } /* Literal */
c-[m] { color: #000000 } /* Literal.Number */
c-[n] { color: #0077aa } /* Name */
c-[o] { color: #999999 } /* Operator */
c-[p] { color: #999999 } /* Punctuation */
c-[s] { color: #a67f59 } /* Literal.String */
c-[t] { color: #a67f59 } /* Literal.String.Single */
c-[u] { color: #a67f59 } /* Literal.String.Double */
c-[cp] { color: #708090 } /* Comment.Preproc */
c-[c1] { color: #708090 } /* Comment.Single */
c-[cs] { color: #708090 } /* Comment.Special */
c-[kc] { color: #990055 } /* Keyword.Constant */
c-[kn] { color: #990055 } /* Keyword.Namespace */
c-[kp] { color: #990055 } /* Keyword.Pseudo */
c-[kr] { color: #990055 } /* Keyword.Reserved */
c-[ld] { color: #000000 } /* Literal.Date */
c-[nc] { color: #0077aa } /* Name.Class */
c-[no] { color: #0077aa } /* Name.Constant */
c-[nd] { color: #0077aa } /* Name.Decorator */
c-[ni] { color: #0077aa } /* Name.Entity */
c-[ne] { color: #0077aa } /* Name.Exception */
c-[nf] { color: #0077aa } /* Name.Function */
c-[nl] { color: #0077aa } /* Name.Label */
c-[nn] { color: #0077aa } /* Name.Namespace */
c-[py] { color: #0077aa } /* Name.Property */
c-[ow] { color: #999999 } /* Operator.Word */
c-[mb] { color: #000000 } /* Literal.Number.Bin */
c-[mf] { color: #000000 } /* Literal.Number.Float */
c-[mh] { color: #000000 } /* Literal.Number.Hex */
c-[mi] { color: #000000 } /* Literal.Number.Integer */
c-[mo] { color: #000000 } /* Literal.Number.Oct */
c-[sb] { color: #a67f59 } /* Literal.String.Backtick */
c-[sc] { color: #a67f59 } /* Literal.String.Char */
c-[sd] { color: #a67f59 } /* Literal.String.Doc */
c-[se] { color: #a67f59 } /* Literal.String.Escape */
c-[sh] { color: #a67f59 } /* Literal.String.Heredoc */
c-[si] { color: #a67f59 } /* Literal.String.Interpol */
c-[sx] { color: #a67f59 } /* Literal.String.Other */
c-[sr] { color: #a67f59 } /* Literal.String.Regex */
c-[ss] { color: #a67f59 } /* Literal.String.Symbol */
c-[vc] { color: #0077aa } /* Name.Variable.Class */
c-[vg] { color: #0077aa } /* Name.Variable.Global */
c-[vi] { color: #0077aa } /* Name.Variable.Instance */
c-[il] { color: #000000 } /* Literal.Number.Integer.Long */
</style>
 <body class="h-entry">
  <div class="head">
   <p data-fill-with="logo"><a class="logo" href="https://www.w3.org/"> <img alt="W3C" height="48" src="https://www.w3.org/StyleSheets/TR/2016/logos/W3C" width="72"> </a> </p>
   <h1 class="p-name no-ref" id="title">WebXR Test API</h1>
   <h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft, <time class="dt-updated" datetime="1970-01-01">1 January 1970</time></span></h2>
   <div data-fill-with="spec-metadata">
    <dl>
     <dt>This version:
     <dd><a class="u-url" href="https://immersive-web.github.io/webxr-test-api/">https://immersive-web.github.io/webxr-test-api/</a>
     <dt class="editor">Editors:
     <dd class="editor p-author h-card vcard" data-editor-id="109489"><a class="p-name fn u-email email" href="mailto:manish@mozilla.com">Manish Goregaokar</a> (<a class="p-org org" href="http://mozilla.org/">Mozilla</a>)
     <dd class="editor p-author h-card vcard" data-editor-id="114716"><a class="p-name fn u-email email" href="mailto:alcooper@google.com">Alex Cooper</a> (<a class="p-org org" href="http://google.com/">Google</a>)
     <dd class="editor p-author h-card vcard"><span class="p-name fn"></span>
    </dl>
   </div>
   <div data-fill-with="warning">
    <details class="annoying-warning" open>
     <summary>Testing-only API</summary>
     <p><b>The API represented in this document is for testing only and should not be exposed to users.</b></p>
    </details>
   </div>
   <p class="copyright" data-fill-with="copyright"><a href="https://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 1970 <a href="https://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a href="https://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href="https://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>, <a href="https://www.keio.ac.jp/">Keio</a>, <a href="https://ev.buaa.edu.cn/">Beihang</a>). W3C <a href="https://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="https://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document" rel="license">permissive document license</a> rules apply. </p>
   <hr title="Separator for header">
  </div>
  <div class="p-summary" data-fill-with="abstract">
   <h2 class="no-num no-toc no-ref heading settled" id="abstract"><span class="content">Abstract</span></h2>
   <p>The WebXR Test API module provides a mocking interface for <a href="https://github.com/web-platform-tests/">Web Platform Tests</a> to be able to test the <a href="https://www.w3.org/TR/webxr/">WebXR Device API</a>.</p>
  </div>
  <h2 class="no-num no-toc no-ref heading settled" id="status"><span class="content">Status of this document</span></h2>
  <div data-fill-with="status">
   <p> <em>This section describes the status of this document at the time of its publication. Other
    documents may supersede this document. A list of current <abbr title="World Wide Web Consortium">W3C</abbr> publications and the latest revision of this
    technical report can be found in the <a href="http://www.w3.org/TR/"><abbr title="World Wide Web Consortium">W3C</abbr> technical
    reports index</a> at http://www.w3.org/TR/.</em> </p>
   <p> This document was published by the <a href="https://www.w3.org/immersive-web/">Immersive Web Working Group</a> as an Editors' Draft. This document is intended to become a W3C Recommendation.

    Feedback and comments on this specification are welcome. Please use <a href="https://github.com/immersive-web/webxr-test-api/issues">Github issues</a>.
    Discussions may also be found in the <a href="http://lists.w3.org/Archives/Public/public-immersive-web/">public-immersive-web@w3.org archives</a>. </p>
   <p> Publication as an Editors' Draft does not imply endorsement by the <abbr title="World Wide Web Consortium">W3C</abbr> Membership. This is a draft document and may
    be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite
    this document as other than work in progress. </p>
   <p> This document was produced by a group operating under the <a href="http://www.w3.org/Consortium/Patent-Policy/"> <abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>. <abbr title="World Wide Web Consortium">W3C</abbr> maintains a <a href="https://www.w3.org/2004/01/pp-impl/109735/status" rel="disclosure">public list of any
    patent disclosures</a> made in connection with the deliverables of the group; that page also
    includes instructions for disclosing a patent. An individual who has actual knowledge of a
    patent which the individual believes contains <a href="http://www.w3.org/Consortium/Patent-Policy/#def-essential">Essential
    Claim(s)</a> must disclose the information in accordance with <a href="http://www.w3.org/Consortium/Patent-Policy/#sec-Disclosure">section 6 of the <abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>. </p>
   <p> This document is governed by the <a href="https://www.w3.org/2019/Process-20190301/" id="w3c_process_revision">1 March 2019 W3C Process Document</a>. </p>
   <p></p>
  </div>
  <div data-fill-with="at-risk"></div>
  <nav data-fill-with="table-of-contents" id="toc">
   <h2 class="no-num no-toc no-ref" id="contents">Table of Contents</h2>
   <ol class="toc" role="directory">
    <li><a href="#intro"><span class="secno">1</span> <span class="content">Introduction</span></a>
    <li><a href="#conformance"><span class="secno">2</span> <span class="content">Conformance</span></a>
    <li><a href="#simulated-devices"><span class="secno">3</span> <span class="content">Simulated devices</span></a>
    <li>
     <a href="#initialization"><span class="secno">4</span> <span class="content">Initialization</span></a>
     <ol class="toc">
      <li><a href="#xr-test-attribute"><span class="secno">4.1</span> <span class="content">navigator.xr.test</span></a>
      <li><a href="#xrtest-interface"><span class="secno">4.2</span> <span class="content">XRTest</span></a>
      <li><a href="#fakexrdeviceinit-dict"><span class="secno">4.3</span> <span class="content">FakeXRDeviceInit</span></a>
     </ol>
    <li>
     <a href="#mocking"><span class="secno">5</span> <span class="content">Mocking</span></a>
     <ol class="toc">
      <li><a href="#fakexrdevice-interface"><span class="secno">5.1</span> <span class="content">FakeXRDevice</span></a>
      <li><a href="#fakexrinputcontroller-init"><span class="secno">5.2</span> <span class="content">FakeXRInputController</span></a>
     </ol>
    <li><a href="#hit-test-extensions"><span class="secno">6</span> <span class="content">Hit test extensions</span></a>
    <li>
     <a href="#index"><span class="secno"></span> <span class="content">Index</span></a>
     <ol class="toc">
      <li><a href="#index-defined-here"><span class="secno"></span> <span class="content">Terms defined by this specification</span></a>
      <li><a href="#index-defined-elsewhere"><span class="secno"></span> <span class="content">Terms defined by reference</span></a>
     </ol>
    <li>
     <a href="#references"><span class="secno"></span> <span class="content">References</span></a>
     <ol class="toc">
      <li><a href="#normative"><span class="secno"></span> <span class="content">Normative References</span></a>
     </ol>
    <li><a href="#idl-index"><span class="secno"></span> <span class="content">IDL Index</span></a>
   </ol>
  </nav>
  <main>
   <h2 class="heading settled" data-level="1" id="intro"><span class="secno">1. </span><span class="content">Introduction</span><a class="self-link" href="#intro"></a></h2>
   <section class="non-normative">
    <p>In order to allow <a href="https://web-platform-tests.org/">Web Platform Tests</a> for WebXR there are some basic functions which are common across all tests, such as adding a fake test device and specifying poses. Below is an API which attempts to capture the necessary functions, based off what was defined in the spec. Different browser vendors can implement this API in whatever way is most compatible with their browser. For example, some browsers may back the interface with a WebDriver API while others may use HTTP or IPC mechanisms to communicate with an out of process fake backend.</p>
    <p>These initialization object and control interfaces do not represent a complete set of WebXR functionality, and are expected to be expanded on as the WebXR spec grows.</p>
   </section>
   <h2 class="heading settled" data-level="2" id="conformance"><span class="secno">2. </span><span class="content">Conformance</span><a class="self-link" href="#conformance"></a></h2>
   <p>Interfaces and functionality exposed by this specification SHOULD NOT be exposed to typical browsing experiences, and instead SHOULD only be used when running <a href="https://web-platform-tests.org/">Web Platform Tests</a>.</p>
   <h2 class="heading settled" data-level="3" id="simulated-devices"><span class="secno">3. </span><span class="content">Simulated devices</span><a class="self-link" href="#simulated-devices"></a></h2>
   <p>This API gives tests the ability to spin up a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="simulated-xr-device">simulated XR device</dfn> which is an <a data-link-type="dfn">XR device</a> which from the point of view of the WebXR API behaves like a normal <a data-link-type="dfn">XR device</a>. These <a data-link-type="dfn" href="#simulated-xr-device" id="ref-for-simulated-xr-device">simulated XR devices</a> can be controlled by the associated <code class="idl"><a data-link-type="idl" href="#fakexrdevice" id="ref-for-fakexrdevice">FakeXRDevice</a></code> object.</p>
   <p>Every <a data-link-type="dfn" href="#simulated-xr-device" id="ref-for-simulated-xr-device①">simulated XR device</a> may have an <dfn class="dfn-paneled" data-dfn-for="simulated XR device" data-dfn-type="dfn" data-noexport id="simulated-xr-device-native-bounds-geometry">native bounds geometry</dfn> which is an array of <code class="idl"><a data-link-type="idl" href="https://drafts.fxtf.org/geometry-1/#dompointreadonly" id="ref-for-dompointreadonly">DOMPointReadOnly</a></code>s, used to initialize the <a data-link-type="dfn">native bounds geometry</a> of any <code class="idl"><a data-link-type="idl">XRBoundedReferenceSpace</a></code>s created for the device. If <code>null</code>, the device is treated as if it is not currently tracking a bounded reference space.</p>
   <p>Every <a data-link-type="dfn" href="#simulated-xr-device" id="ref-for-simulated-xr-device②">simulated XR device</a> may have a <dfn class="dfn-paneled" data-dfn-for="simulated XR device" data-dfn-type="dfn" data-noexport id="simulated-xr-device-floor-origin">floor origin</dfn> which is an <code class="idl"><a data-link-type="idl">XRRigidTransform</a></code> used to note the position of the physical floor. If <code>null</code>, the device is treated as if it is unable to identify the physical floor.</p>
   <p>Every <a data-link-type="dfn" href="#simulated-xr-device" id="ref-for-simulated-xr-device③">simulated XR device</a> may have an <dfn class="dfn-paneled" data-dfn-for="simulated XR device" data-dfn-type="dfn" data-noexport id="simulated-xr-device-viewer-origin">viewer origin</dfn> which is an <code class="idl"><a data-link-type="idl">XRRigidTransform</a></code> used to set the position and orientation of the <a data-link-type="dfn">viewer</a>. If <code>null</code>, the device is treated as if it has lost tracking.</p>
   <p>Every <a data-link-type="dfn" href="#simulated-xr-device" id="ref-for-simulated-xr-device④">simulated XR device</a> has an <dfn class="dfn-paneled" data-dfn-for="simulated XR device" data-dfn-type="dfn" data-noexport id="simulated-xr-device-emulated-position-boolean">emulated position boolean</dfn> which is a boolean used to set the <code class="idl"><a data-link-type="idl">emulatedPosition</a></code> of any <code class="idl"><a data-link-type="idl">XRPose</a></code>s produced involving the <a data-link-type="dfn">viewer</a>. This is initially <code>false</code>.</p>
   <p>Every <a data-link-type="dfn" href="#simulated-xr-device" id="ref-for-simulated-xr-device⑤">simulated XR device</a> has an <dfn class="dfn-paneled" data-dfn-for="simulated XR device" data-dfn-type="dfn" data-noexport id="simulated-xr-device-visibility-state">visibility state</dfn> which is an <code class="idl"><a data-link-type="idl">XRVisibilityState</a></code> used to set the <code class="idl"><a data-link-type="idl">visibilityState</a></code> of any <code class="idl"><a data-link-type="idl">XRSession</a></code>s associated with the <a data-link-type="dfn" href="#simulated-xr-device" id="ref-for-simulated-xr-device⑥">simulated XR device</a> . This is initially <code class="idl"><a data-link-type="idl">"visible"</a></code>. When it is changed, the associated changes must be reflected on the <code class="idl"><a data-link-type="idl">XRSession</a></code>, including triggering <code class="idl"><a data-link-type="idl">onvisibilitychange</a></code> events if necessary.</p>
   <p>Every <a data-link-type="dfn">view</a> for a <a data-link-type="dfn" href="#simulated-xr-device" id="ref-for-simulated-xr-device⑦">simulated XR device</a> has an associated <dfn class="dfn-paneled" data-dfn-for="view" data-dfn-type="dfn" data-noexport id="view-device-resolution">device resolution</dfn>, which is an instance of <code class="idl"><a data-link-type="idl" href="#dictdef-fakexrdeviceresolution" id="ref-for-dictdef-fakexrdeviceresolution">FakeXRDeviceResolution</a></code>. This resolution must be used when constructing <code class="idl"><a data-link-type="idl">XRViewport</a></code> values for the <a data-link-type="dfn">view</a>, based on the canvas size.</p>
   <p>Every <a data-link-type="dfn">view</a> for a <a data-link-type="dfn" href="#simulated-xr-device" id="ref-for-simulated-xr-device⑧">simulated XR device</a> may have an associated <dfn class="dfn-paneled" data-dfn-for="view" data-dfn-type="dfn" data-noexport id="view-field-of-view">field of view</dfn>, which is an instance of <code class="idl"><a data-link-type="idl" href="#dictdef-fakexrfieldofviewinit" id="ref-for-dictdef-fakexrfieldofviewinit">FakeXRFieldOfViewInit</a></code> used to calculate projection matrices using depth values. If the <a data-link-type="dfn" href="#view-field-of-view" id="ref-for-view-field-of-view">field of view</a> is set, projection matrix values are calculated using the <a data-link-type="dfn" href="#view-field-of-view" id="ref-for-view-field-of-view①">field of view</a> and <code class="idl"><a data-link-type="idl">depthNear</a></code> and <code class="idl"><a data-link-type="idl">depthFar</a></code> values.</p>
   <p>The WebXR API never exposes native origins directly, instead exposing transforms between them, so we need to specify a base reference space for <code class="idl"><a data-link-type="idl" href="#dictdef-fakexrrigidtransforminit" id="ref-for-dictdef-fakexrrigidtransforminit">FakeXRRigidTransformInit</a></code>s so that we can have consistent numerical values across implementations. When used as an origin, <code class="idl"><a data-link-type="idl" href="#dictdef-fakexrrigidtransforminit" id="ref-for-dictdef-fakexrrigidtransforminit①">FakeXRRigidTransformInit</a></code>s are in the base reference space where the <a data-link-type="dfn">viewer</a>'s <a data-link-type="dfn">native origin</a> is identity at initialization, unless otherwise specified. In this space, the <code class="idl"><a data-link-type="idl">"local"</a></code> reference space has a <a data-link-type="dfn">native origin</a> of identity. This is an arbitrary choice: changing this reference space doesn’t affect the data returned by the WebXR API, but we must make such a choice so that the tests produce the same results across different UAs. When used as an origin it is logically a transform <i>from</i> the origin’s space <i>to</i> the underlying base reference space described above.</p>
   <h2 class="heading settled" data-level="4" id="initialization"><span class="secno">4. </span><span class="content">Initialization</span><a class="self-link" href="#initialization"></a></h2>
   <h3 class="heading settled" data-level="4.1" id="xr-test-attribute"><span class="secno">4.1. </span><span class="content">navigator.xr.test</span><a class="self-link" href="#xr-test-attribute"></a></h3>
<pre class="idl highlight def"><c- b>partial</c-> <c- b>interface</c-> <a class="idl-code" data-link-type="interface"><c- g>XR</c-></a> {
    [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#xrtest" id="ref-for-xrtest"><c- n>XRTest</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRTest" href="#dom-xr-test" id="ref-for-dom-xr-test"><c- g>test</c-></a>;
};
</pre>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="XR" data-dfn-type="attribute" data-export id="dom-xr-test"><code>test</code></dfn> attribute’s getter MUST return the <code class="idl"><a data-link-type="idl" href="#xrtest" id="ref-for-xrtest①">XRTest</a></code> object that is associated with it. This object MAY be lazily created.</p>
   <h3 class="heading settled" data-level="4.2" id="xrtest-interface"><span class="secno">4.2. </span><span class="content">XRTest</span><a class="self-link" href="#xrtest-interface"></a></h3>
   <p>The <code class="idl"><a data-link-type="idl" href="#xrtest" id="ref-for-xrtest②">XRTest</a></code> object is the entry point for all testing.</p>
<pre class="idl highlight def"><c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="xrtest"><code><c- g>XRTest</c-></code></dfn> {
  <c- b>Promise</c->&lt;<a class="n" data-link-type="idl-name" href="#fakexrdevice" id="ref-for-fakexrdevice①"><c- n>FakeXRDevice</c-></a>> <a class="idl-code" data-link-type="method" href="#dom-xrtest-simulatedeviceconnection" id="ref-for-dom-xrtest-simulatedeviceconnection"><c- g>simulateDeviceConnection</c-></a>(<a class="n" data-link-type="idl-name" href="#dictdef-fakexrdeviceinit" id="ref-for-dictdef-fakexrdeviceinit"><c- n>FakeXRDeviceInit</c-></a> <dfn class="idl-code" data-dfn-for="XRTest/simulateDeviceConnection(init)" data-dfn-type="argument" data-export id="dom-xrtest-simulatedeviceconnection-init-init"><code><c- g>init</c-></code><a class="self-link" href="#dom-xrtest-simulatedeviceconnection-init-init"></a></dfn>);
  <c- b>void</c-> <a class="idl-code" data-link-type="method" href="#dom-xrtest-simulateuseractivation" id="ref-for-dom-xrtest-simulateuseractivation"><c- g>simulateUserActivation</c-></a>(<a class="n" data-link-type="idl-name" href="https://heycam.github.io/webidl/#Function" id="ref-for-Function"><c- n>Function</c-></a> <dfn class="idl-code" data-dfn-for="XRTest/simulateUserActivation(f)" data-dfn-type="argument" data-export id="dom-xrtest-simulateuseractivation-f-f"><code><c- g>f</c-></code><a class="self-link" href="#dom-xrtest-simulateuseractivation-f-f"></a></dfn>);
  <c- b>Promise</c->&lt;<c- b>void</c->> <a class="idl-code" data-link-type="method" href="#dom-xrtest-disconnectalldevices" id="ref-for-dom-xrtest-disconnectalldevices"><c- g>disconnectAllDevices</c-></a>();
};
</pre>
   <div class="algorithm" data-algorithm="simulate-device-connection">
     The <dfn class="dfn-paneled idl-code" data-dfn-for="XRTest" data-dfn-type="method" data-export id="dom-xrtest-simulatedeviceconnection"><code>simulateDeviceConnection(<var>init</var>)</code></dfn> method creates a new <a data-link-type="dfn" href="#simulated-xr-device" id="ref-for-simulated-xr-device⑨">simulated XR device</a>. 
    <p>When this method is invoked, the user agent MUST run the following steps:</p>
    <ol>
     <li data-md>
      <p>Let <var>promise</var> be <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#a-new-promise" id="ref-for-a-new-promise">a new Promise</a>.</p>
     <li data-md>
      <p>Run the following steps <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel" id="ref-for-in-parallel">in parallel</a>:</p>
      <ol>
       <li data-md>
        <p>Let <var>device</var> be a new <a data-link-type="dfn" href="#simulated-xr-device" id="ref-for-simulated-xr-device①⓪">simulated XR device</a>.</p>
       <li data-md>
        <p>For each <var>view</var> in <var>init</var>’s <code class="idl"><a data-link-type="idl" href="#dom-fakexrdeviceinit-views" id="ref-for-dom-fakexrdeviceinit-views">views</a></code>:</p>
        <ol>
         <li data-md>
          <p>Let <var>v</var> be the result of running <a data-link-type="dfn" href="#parse-a-view" id="ref-for-parse-a-view">parse a view</a> on <var>view</var>.</p>
         <li data-md>
          <p>If running <a data-link-type="dfn" href="#parse-a-view" id="ref-for-parse-a-view①">parse a view</a> threw an error, reject <var>promise</var> with this error and abort these steps.</p>
         <li data-md>
          <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-append" id="ref-for-list-append">Append</a> <var>v</var> to <var>device</var>’s list of views.</p>
        </ol>
       <li data-md>
        <p>If <var>init</var>’s <code class="idl"><a data-link-type="idl" href="#dom-fakexrdeviceinit-supportedfeatures" id="ref-for-dom-fakexrdeviceinit-supportedfeatures">supportedFeatures</a></code> is set, set <var>device</var>’s <a data-link-type="dfn">list of features it is capable of supporting</a> to <var>init</var>’s <code class="idl"><a data-link-type="idl" href="#dom-fakexrdeviceinit-supportedfeatures" id="ref-for-dom-fakexrdeviceinit-supportedfeatures①">supportedFeatures</a></code>.</p>
       <li data-md>
        <p>If <var>init</var>’s <code class="idl"><a data-link-type="idl" href="#dom-fakexrdeviceinit-boundscoordinates" id="ref-for-dom-fakexrdeviceinit-boundscoordinates">boundsCoordinates</a></code> is set, perform the following steps:</p>
        <ol>
         <li data-md>
          <p>If <var>init</var>’s <code class="idl"><a data-link-type="idl" href="#dom-fakexrdeviceinit-boundscoordinates" id="ref-for-dom-fakexrdeviceinit-boundscoordinates①">boundsCoordinates</a></code> has less than 3 elements, reject <var>promise</var> with <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#exceptiondef-typeerror" id="ref-for-exceptiondef-typeerror">TypeError</a></code> and abort these steps.</p>
         <li data-md>
          <p>Set <var>device</var>’s <a data-link-type="dfn" href="#simulated-xr-device-native-bounds-geometry" id="ref-for-simulated-xr-device-native-bounds-geometry">native bounds geometry</a> to <var>init</var>’s <code class="idl"><a data-link-type="idl" href="#dom-fakexrdeviceinit-boundscoordinates" id="ref-for-dom-fakexrdeviceinit-boundscoordinates②">boundsCoordinates</a></code>.</p>
        </ol>
       <li data-md>
        <p>If <var>init</var>’s <code class="idl"><a data-link-type="idl" href="#dom-fakexrdeviceinit-floororigin" id="ref-for-dom-fakexrdeviceinit-floororigin">floorOrigin</a></code> is set, set <var>device</var>’s <a data-link-type="dfn" href="#simulated-xr-device-floor-origin" id="ref-for-simulated-xr-device-floor-origin">floor origin</a> to <var>init</var>’s <code class="idl"><a data-link-type="idl" href="#dom-fakexrdeviceinit-floororigin" id="ref-for-dom-fakexrdeviceinit-floororigin①">floorOrigin</a></code>.</p>
       <li data-md>
        <p>If <var>init</var>’s <code class="idl"><a data-link-type="idl" href="#dom-fakexrdeviceinit-viewerorigin" id="ref-for-dom-fakexrdeviceinit-viewerorigin">viewerOrigin</a></code> is set, set <var>device</var>’s <a data-link-type="dfn" href="#simulated-xr-device-viewer-origin" id="ref-for-simulated-xr-device-viewer-origin">viewer origin</a> to <var>init</var>’s <code class="idl"><a data-link-type="idl" href="#dom-fakexrdeviceinit-viewerorigin" id="ref-for-dom-fakexrdeviceinit-viewerorigin①">viewerOrigin</a></code>.</p>
       <li data-md>
        <p>Let <var>supportedModes</var> be an empty list of <code class="idl"><a data-link-type="idl">XRSessionMode</a></code>s.</p>
       <li data-md>
        <p>Modify <var>supportedModes</var> as follows:</p>
        <dl class="switch">
         <dt>If <var>init</var>’s <code class="idl"><a data-link-type="idl" href="#dom-fakexrdeviceinit-supportedmodes" id="ref-for-dom-fakexrdeviceinit-supportedmodes">supportedModes</a></code> is present:
         <dd>
          <ol>
           <li data-md>
            <p>Append the contents of <var>init</var>’s <code class="idl"><a data-link-type="idl" href="#dom-fakexrdeviceinit-supportedmodes" id="ref-for-dom-fakexrdeviceinit-supportedmodes①">supportedModes</a></code> to <var>supportedModes</var>.</p>
           <li data-md>
            <p>If <var>supportedModes</var> is empty, append <code>"inline"</code> to it.</p>
          </ol>
         <dt>Else
         <dd>
          <ol>
           <li data-md>
            <p>Append <code>"inline"</code> to <var>supportedModes</var>.</p>
           <li data-md>
            <p>If <var>init</var>’s <code class="idl"><a data-link-type="idl" href="#dom-fakexrdeviceinit-supportsimmersive" id="ref-for-dom-fakexrdeviceinit-supportsimmersive">supportsImmersive</a></code> is <code>true</code>, append <code>"immersive-vr"</code> to <var>supportedModes</var>.</p>
          </ol>
        </dl>
       <li data-md>
        <p>Set <var>device</var>’s <a data-link-type="dfn">list of supported modes</a> to <var>supportedModes</var>.</p>
       <li data-md>
        <p>Register <var>device</var> based on the following:</p>
        <ol>
         <li data-md>
          <p>If <var>supportedModes</var> contains <code>"immersive-vr"</code> or <code>"immersive-ar"</code>, append <var>device</var> to the <code class="idl"><a data-link-type="idl">xr</a></code>'s <a data-link-type="dfn">list of immersive XR devices</a>.</p>
         <li data-md>
          <p>If <var>supportedModes</var> contains <code>"inline"</code>, set the <a data-link-type="dfn">inline XR device</a> to <var>device</var>.</p>
        </ol>
       <li data-md>
        <p>Let <var>d</var> be a new <code class="idl"><a data-link-type="idl" href="#fakexrdevice" id="ref-for-fakexrdevice②">FakeXRDevice</a></code> object with <a data-link-type="dfn" href="#fakexrdevice-device" id="ref-for-fakexrdevice-device">device</a> as <var>device</var>.</p>
       <li data-md>
        <p><a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#resolve-promise" id="ref-for-resolve-promise">Resolve</a> <var>promise</var> with <var>d</var>.</p>
      </ol>
     <li data-md>
      <p>Return <var>promise</var>.</p>
    </ol>
   </div>
   <p>When <dfn class="dfn-paneled idl-code" data-dfn-for="XRTest" data-dfn-type="method" data-export id="dom-xrtest-simulateuseractivation"><code>simulateUserActivation(f)</code></dfn> is called, invoke <code>f</code> as if it was <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/interaction.html#triggered-by-user-activation" id="ref-for-triggered-by-user-activation">triggered by user activation</a>.</p>
   <p>When <dfn class="dfn-paneled idl-code" data-dfn-for="XRTest" data-dfn-type="method" data-export id="dom-xrtest-disconnectalldevices"><code>disconnectAllDevices()</code></dfn> is called, remove all <a data-link-type="dfn" href="#simulated-xr-device" id="ref-for-simulated-xr-device①①">simulated XR devices</a> from the <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#context-object" id="ref-for-context-object">context object</a>'s <code class="idl"><a data-link-type="idl">XR</a></code> object’s <a data-link-type="dfn">list of immersive XR devices</a> as if they were disconnected. If the <a data-link-type="dfn">inline XR device</a> is a <a data-link-type="dfn" href="#simulated-xr-device" id="ref-for-simulated-xr-device①②">simulated XR device</a>, reset it to the default <a data-link-type="dfn">inline XR device</a>.</p>
   <h3 class="heading settled" data-level="4.3" id="fakexrdeviceinit-dict"><span class="secno">4.3. </span><span class="content">FakeXRDeviceInit</span><a class="self-link" href="#fakexrdeviceinit-dict"></a></h3>
<pre class="idl highlight def"><c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-fakexrdeviceinit"><code><c- g>FakeXRDeviceInit</c-></code></dfn> {
    <c- b>required</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean"><c- b>boolean</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="FakeXRDeviceInit" data-dfn-type="dict-member" data-export data-type="boolean " id="dom-fakexrdeviceinit-supportsimmersive"><code><c- g>supportsImmersive</c-></code></dfn>;
    <c- b>sequence</c->&lt;<a class="n" data-link-type="idl-name"><c- n>XRSessionMode</c-></a>> <dfn class="dfn-paneled idl-code" data-dfn-for="FakeXRDeviceInit" data-dfn-type="dict-member" data-export data-type="sequence<XRSessionMode> " id="dom-fakexrdeviceinit-supportedmodes"><code><c- g>supportedModes</c-></code></dfn>;
    <c- b>required</c-> <c- b>sequence</c->&lt;<a class="n" data-link-type="idl-name" href="#dictdef-fakexrviewinit" id="ref-for-dictdef-fakexrviewinit"><c- n>FakeXRViewInit</c-></a>> <dfn class="dfn-paneled idl-code" data-dfn-for="FakeXRDeviceInit" data-dfn-type="dict-member" data-export data-type="sequence<FakeXRViewInit> " id="dom-fakexrdeviceinit-views"><code><c- g>views</c-></code></dfn>;

    <c- b>sequence</c->&lt;<c- b>any</c->> <dfn class="dfn-paneled idl-code" data-dfn-for="FakeXRDeviceInit" data-dfn-type="dict-member" data-export data-type="sequence<any> " id="dom-fakexrdeviceinit-supportedfeatures"><code><c- g>supportedFeatures</c-></code></dfn>;
    <c- b>sequence</c->&lt;<a class="n" data-link-type="idl-name" href="#dictdef-fakexrboundspoint" id="ref-for-dictdef-fakexrboundspoint"><c- n>FakeXRBoundsPoint</c-></a>> <dfn class="dfn-paneled idl-code" data-dfn-for="FakeXRDeviceInit" data-dfn-type="dict-member" data-export data-type="sequence<FakeXRBoundsPoint> " id="dom-fakexrdeviceinit-boundscoordinates"><code><c- g>boundsCoordinates</c-></code></dfn>;
    <a class="n" data-link-type="idl-name" href="#dictdef-fakexrrigidtransforminit" id="ref-for-dictdef-fakexrrigidtransforminit②"><c- n>FakeXRRigidTransformInit</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="FakeXRDeviceInit" data-dfn-type="dict-member" data-export data-type="FakeXRRigidTransformInit " id="dom-fakexrdeviceinit-floororigin"><code><c- g>floorOrigin</c-></code></dfn>;
    <a class="n" data-link-type="idl-name" href="#dictdef-fakexrrigidtransforminit" id="ref-for-dictdef-fakexrrigidtransforminit③"><c- n>FakeXRRigidTransformInit</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="FakeXRDeviceInit" data-dfn-type="dict-member" data-export data-type="FakeXRRigidTransformInit " id="dom-fakexrdeviceinit-viewerorigin"><code><c- g>viewerOrigin</c-></code></dfn>;

    // Hit test extensions:
    <a class="n" data-link-type="idl-name" href="#dictdef-fakexrworldinit" id="ref-for-dictdef-fakexrworldinit"><c- n>FakeXRWorldInit</c-></a> <dfn class="idl-code" data-dfn-for="FakeXRDeviceInit" data-dfn-type="dict-member" data-export data-type="FakeXRWorldInit " id="dom-fakexrdeviceinit-world"><code><c- g>world</c-></code><a class="self-link" href="#dom-fakexrdeviceinit-world"></a></dfn>;
};

<c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-fakexrviewinit"><code><c- g>FakeXRViewInit</c-></code></dfn> {
  <c- b>required</c-> <a class="n" data-link-type="idl-name"><c- n>XREye</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="FakeXRViewInit" data-dfn-type="dict-member" data-export data-type="XREye " id="dom-fakexrviewinit-eye"><code><c- g>eye</c-></code></dfn>;
  <c- b>required</c-> <c- b>sequence</c->&lt;<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-float" id="ref-for-idl-float"><c- b>float</c-></a>> <dfn class="dfn-paneled idl-code" data-dfn-for="FakeXRViewInit" data-dfn-type="dict-member" data-export data-type="sequence<float> " id="dom-fakexrviewinit-projectionmatrix"><code><c- g>projectionMatrix</c-></code></dfn>;
  <c- b>required</c-> <a class="n" data-link-type="idl-name" href="#dictdef-fakexrdeviceresolution" id="ref-for-dictdef-fakexrdeviceresolution①"><c- n>FakeXRDeviceResolution</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="FakeXRViewInit" data-dfn-type="dict-member" data-export data-type="FakeXRDeviceResolution " id="dom-fakexrviewinit-resolution"><code><c- g>resolution</c-></code></dfn>;
  <c- b>required</c-> <a class="n" data-link-type="idl-name" href="#dictdef-fakexrrigidtransforminit" id="ref-for-dictdef-fakexrrigidtransforminit④"><c- n>FakeXRRigidTransformInit</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="FakeXRViewInit" data-dfn-type="dict-member" data-export data-type="FakeXRRigidTransformInit " id="dom-fakexrviewinit-viewoffset"><code><c- g>viewOffset</c-></code></dfn>;
  <a class="n" data-link-type="idl-name" href="#dictdef-fakexrfieldofviewinit" id="ref-for-dictdef-fakexrfieldofviewinit①"><c- n>FakeXRFieldOfViewInit</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="FakeXRViewInit" data-dfn-type="dict-member" data-export data-type="FakeXRFieldOfViewInit " id="dom-fakexrviewinit-fieldofview"><code><c- g>fieldOfView</c-></code></dfn>;
};

<c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-fakexrfieldofviewinit"><code><c- g>FakeXRFieldOfViewInit</c-></code></dfn> {
  <c- b>required</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-float" id="ref-for-idl-float①"><c- b>float</c-></a> <dfn class="idl-code" data-dfn-for="FakeXRFieldOfViewInit" data-dfn-type="dict-member" data-export data-type="float " id="dom-fakexrfieldofviewinit-updegrees"><code><c- g>upDegrees</c-></code><a class="self-link" href="#dom-fakexrfieldofviewinit-updegrees"></a></dfn>;
  <c- b>required</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-float" id="ref-for-idl-float②"><c- b>float</c-></a> <dfn class="idl-code" data-dfn-for="FakeXRFieldOfViewInit" data-dfn-type="dict-member" data-export data-type="float " id="dom-fakexrfieldofviewinit-downdegrees"><code><c- g>downDegrees</c-></code><a class="self-link" href="#dom-fakexrfieldofviewinit-downdegrees"></a></dfn>;
  <c- b>required</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-float" id="ref-for-idl-float③"><c- b>float</c-></a> <dfn class="idl-code" data-dfn-for="FakeXRFieldOfViewInit" data-dfn-type="dict-member" data-export data-type="float " id="dom-fakexrfieldofviewinit-leftdegrees"><code><c- g>leftDegrees</c-></code><a class="self-link" href="#dom-fakexrfieldofviewinit-leftdegrees"></a></dfn>;
  <c- b>required</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-float" id="ref-for-idl-float④"><c- b>float</c-></a> <dfn class="idl-code" data-dfn-for="FakeXRFieldOfViewInit" data-dfn-type="dict-member" data-export data-type="float " id="dom-fakexrfieldofviewinit-rightdegrees"><code><c- g>rightDegrees</c-></code><a class="self-link" href="#dom-fakexrfieldofviewinit-rightdegrees"></a></dfn>;
};

<c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-fakexrdeviceresolution"><code><c- g>FakeXRDeviceResolution</c-></code></dfn> {
    <c- b>required</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-long" id="ref-for-idl-long"><c- b>long</c-></a> <dfn class="idl-code" data-dfn-for="FakeXRDeviceResolution" data-dfn-type="dict-member" data-export data-type="long " id="dom-fakexrdeviceresolution-width"><code><c- g>width</c-></code><a class="self-link" href="#dom-fakexrdeviceresolution-width"></a></dfn>;
    <c- b>required</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-long" id="ref-for-idl-long①"><c- b>long</c-></a> <dfn class="idl-code" data-dfn-for="FakeXRDeviceResolution" data-dfn-type="dict-member" data-export data-type="long " id="dom-fakexrdeviceresolution-height"><code><c- g>height</c-></code><a class="self-link" href="#dom-fakexrdeviceresolution-height"></a></dfn>;
};

<c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-fakexrboundspoint"><code><c- g>FakeXRBoundsPoint</c-></code></dfn> {
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-double" id="ref-for-idl-double"><c- b>double</c-></a> <dfn class="idl-code" data-dfn-for="FakeXRBoundsPoint" data-dfn-type="dict-member" data-export data-type="double " id="dom-fakexrboundspoint-x"><code><c- g>x</c-></code><a class="self-link" href="#dom-fakexrboundspoint-x"></a></dfn>; <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-double" id="ref-for-idl-double①"><c- b>double</c-></a> <dfn class="idl-code" data-dfn-for="FakeXRBoundsPoint" data-dfn-type="dict-member" data-export data-type="double " id="dom-fakexrboundspoint-z"><code><c- g>z</c-></code><a class="self-link" href="#dom-fakexrboundspoint-z"></a></dfn>;
};

<c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-fakexrrigidtransforminit"><code><c- g>FakeXRRigidTransformInit</c-></code></dfn> {
  <c- b>required</c-> <c- b>sequence</c->&lt;<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-float" id="ref-for-idl-float⑤"><c- b>float</c-></a>> <dfn class="dfn-paneled idl-code" data-dfn-for="FakeXRRigidTransformInit" data-dfn-type="dict-member" data-export data-type="sequence<float> " id="dom-fakexrrigidtransforminit-position"><code><c- g>position</c-></code></dfn>;
  <c- b>required</c-> <c- b>sequence</c->&lt;<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-float" id="ref-for-idl-float⑥"><c- b>float</c-></a>> <dfn class="dfn-paneled idl-code" data-dfn-for="FakeXRRigidTransformInit" data-dfn-type="dict-member" data-export data-type="sequence<float> " id="dom-fakexrrigidtransforminit-orientation"><code><c- g>orientation</c-></code></dfn>;
};

</pre>
   <p class="advisement"> The <code class="idl"><a data-link-type="idl" href="#dom-fakexrdeviceinit-supportsimmersive" id="ref-for-dom-fakexrdeviceinit-supportsimmersive①">supportsImmersive</a></code> is deprecated in favor of <code class="idl"><a data-link-type="idl" href="#dom-fakexrdeviceinit-supportedmodes" id="ref-for-dom-fakexrdeviceinit-supportedmodes②">supportedModes</a></code> and will be removed in future revisions of the specification. </p>
   <div class="algorithm" data-algorithm="parse-rigid-transform">
     To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="parse-a-rigid-transform">parse a rigid transform</dfn> given a <code class="idl"><a data-link-type="idl" href="#dictdef-fakexrrigidtransforminit" id="ref-for-dictdef-fakexrrigidtransforminit⑤">FakeXRRigidTransformInit</a></code> <var>init</var>, perform the following steps: 
    <ol>
     <li data-md>
      <p>Let <var>p</var> be <var>init</var>’s <code class="idl"><a data-link-type="idl" href="#dom-fakexrrigidtransforminit-position" id="ref-for-dom-fakexrrigidtransforminit-position">position</a></code>.</p>
     <li data-md>
      <p>If <var>p</var> does not have three elements, throw a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#exceptiondef-typeerror" id="ref-for-exceptiondef-typeerror①">TypeError</a></code>.</p>
     <li data-md>
      <p>Let <var>o</var> be <var>init</var>’s <code class="idl"><a data-link-type="idl" href="#dom-fakexrrigidtransforminit-orientation" id="ref-for-dom-fakexrrigidtransforminit-orientation">orientation</a></code>.</p>
     <li data-md>
      <p>If <var>o</var> does not have four elements, throw a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#exceptiondef-typeerror" id="ref-for-exceptiondef-typeerror②">TypeError</a></code>.</p>
     <li data-md>
      <p>Let <var>position</var> be a <code class="idl"><a data-link-type="idl" href="https://drafts.fxtf.org/geometry-1/#dictdef-dompointinit" id="ref-for-dictdef-dompointinit">DOMPointInit</a></code> with <code class="idl"><a data-link-type="idl" href="https://drafts.fxtf.org/geometry-1/#dom-dompointinit-x" id="ref-for-dom-dompointinit-x">x</a></code>, <code class="idl"><a data-link-type="idl" href="https://drafts.fxtf.org/geometry-1/#dom-dompointinit-y" id="ref-for-dom-dompointinit-y">y</a></code> and <code class="idl"><a data-link-type="idl" href="https://drafts.fxtf.org/geometry-1/#dom-dompointinit-z" id="ref-for-dom-dompointinit-z">z</a></code> equal to the three elements of <var>p</var> in order, and <code class="idl"><a data-link-type="idl" href="https://drafts.fxtf.org/geometry-1/#dom-dompointinit-w" id="ref-for-dom-dompointinit-w">w</a></code> equal to <code>1</code>.</p>
     <li data-md>
      <p>Let <var>orientation</var> be a <code class="idl"><a data-link-type="idl" href="https://drafts.fxtf.org/geometry-1/#dictdef-dompointinit" id="ref-for-dictdef-dompointinit①">DOMPointInit</a></code> with <code class="idl"><a data-link-type="idl" href="https://drafts.fxtf.org/geometry-1/#dom-dompointinit-x" id="ref-for-dom-dompointinit-x①">x</a></code>, <code class="idl"><a data-link-type="idl" href="https://drafts.fxtf.org/geometry-1/#dom-dompointinit-y" id="ref-for-dom-dompointinit-y①">y</a></code>, <code class="idl"><a data-link-type="idl" href="https://drafts.fxtf.org/geometry-1/#dom-dompointinit-z" id="ref-for-dom-dompointinit-z①">z</a></code>, and <code class="idl"><a data-link-type="idl" href="https://drafts.fxtf.org/geometry-1/#dom-dompointinit-w" id="ref-for-dom-dompointinit-w①">w</a></code> equal to the four elements of <var>o</var> in order.</p>
     <li data-md>
      <p><code class="idl"><a data-link-type="idl">Construct an XRRigidTransform</a></code> <var>transform</var> with <code class="idl"><a data-link-type="idl">position</a></code> <var>position</var> and <code class="idl"><a data-link-type="idl">orientation</a></code> <var>orientation</var>.</p>
     <li data-md>
      <p>Return <var>transform</var>.</p>
    </ol>
   </div>
   <div class="algorithm" data-algorithm="parse-view">
     To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="parse-a-view">parse a view</dfn> given a <code class="idl"><a data-link-type="idl" href="#dictdef-fakexrviewinit" id="ref-for-dictdef-fakexrviewinit①">FakeXRViewInit</a></code> <var>init</var>, perform the following steps: 
    <ol>
     <li data-md>
      <p>Let <var>view</var> be a new <a data-link-type="dfn">view</a>.</p>
     <li data-md>
      <p>Set <var>view</var>’s <a data-link-type="dfn">eye</a> to <var>init</var>’s <code class="idl"><a data-link-type="idl" href="#dom-fakexrviewinit-eye" id="ref-for-dom-fakexrviewinit-eye">eye</a></code>.</p>
     <li data-md>
      <p>If <var>init</var>’s <code class="idl"><a data-link-type="idl" href="#dom-fakexrviewinit-projectionmatrix" id="ref-for-dom-fakexrviewinit-projectionmatrix">projectionMatrix</a></code> does not have 16 elements, throw a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#exceptiondef-typeerror" id="ref-for-exceptiondef-typeerror③">TypeError</a></code>.</p>
     <li data-md>
      <p>Set <var>view</var>’s <a data-link-type="dfn">projection matrix</a> to <var>init</var>’s <code class="idl"><a data-link-type="idl" href="#dom-fakexrviewinit-projectionmatrix" id="ref-for-dom-fakexrviewinit-projectionmatrix①">projectionMatrix</a></code>.</p>
     <li data-md>
      <p>Set <var>view</var>’s <a data-link-type="dfn">view offset</a> to the result of running <a data-link-type="dfn" href="#parse-a-rigid-transform" id="ref-for-parse-a-rigid-transform">parse a rigid transform</a> <var>init</var>’s <code class="idl"><a data-link-type="idl" href="#dom-fakexrviewinit-viewoffset" id="ref-for-dom-fakexrviewinit-viewoffset">viewOffset</a></code>.</p>
     <li data-md>
      <p>Set <var>view</var>’s <a data-link-type="dfn" href="#view-device-resolution" id="ref-for-view-device-resolution">device resolution</a> to <var>init</var>’s <code class="idl"><a data-link-type="idl" href="#dom-fakexrviewinit-resolution" id="ref-for-dom-fakexrviewinit-resolution">resolution</a></code>.</p>
     <li data-md>
      <p>If <var>init</var>’s <code class="idl"><a data-link-type="idl" href="#dom-fakexrviewinit-fieldofview" id="ref-for-dom-fakexrviewinit-fieldofview">fieldOfView</a></code> is set, perform the following steps:</p>
      <ol>
       <li data-md>
        <p>Set <var>view</var>’s <a data-link-type="dfn" href="#view-field-of-view" id="ref-for-view-field-of-view②">field of view</a> to <var>init</var>’s <code class="idl"><a data-link-type="idl" href="#dom-fakexrviewinit-fieldofview" id="ref-for-dom-fakexrviewinit-fieldofview①">fieldOfView</a></code>.</p>
       <li data-md>
        <p>Set <var>view</var>’s <a data-link-type="dfn">projection matrix</a> to the projection matrix corresponding to this field of view, and depth values equal to <code class="idl"><a data-link-type="idl">depthNear</a></code> and <code class="idl"><a data-link-type="idl">depthFar</a></code> of any <code class="idl"><a data-link-type="idl">XRSession</a></code> associated with the device. If there currently is none, use the default values of <code>near=0.1, far=1000.0</code>.</p>
      </ol>
     <li data-md>
      <p>Set <var>view</var>’s <a data-link-type="dfn">projection matrix</a> to <var>init</var>’s <code class="idl"><a data-link-type="idl" href="#dom-fakexrviewinit-projectionmatrix" id="ref-for-dom-fakexrviewinit-projectionmatrix②">projectionMatrix</a></code>.</p>
     <li data-md>
      <p>Return <var>view</var>.</p>
    </ol>
   </div>
   <h2 class="heading settled" data-level="5" id="mocking"><span class="secno">5. </span><span class="content">Mocking</span><a class="self-link" href="#mocking"></a></h2>
   <h3 class="heading settled" data-level="5.1" id="fakexrdevice-interface"><span class="secno">5.1. </span><span class="content">FakeXRDevice</span><a class="self-link" href="#fakexrdevice-interface"></a></h3>
<pre class="idl highlight def"><c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="fakexrdevice"><code><c- g>FakeXRDevice</c-></code></dfn> {
  <c- b>void</c-> <a class="idl-code" data-link-type="method" href="#dom-fakexrdevice-setviews" id="ref-for-dom-fakexrdevice-setviews"><c- g>setViews</c-></a>(<c- b>sequence</c->&lt;<a class="n" data-link-type="idl-name" href="#dictdef-fakexrviewinit" id="ref-for-dictdef-fakexrviewinit②"><c- n>FakeXRViewInit</c-></a>> <dfn class="idl-code" data-dfn-for="FakeXRDevice/setViews(views)" data-dfn-type="argument" data-export id="dom-fakexrdevice-setviews-views-views"><code><c- g>views</c-></code><a class="self-link" href="#dom-fakexrdevice-setviews-views-views"></a></dfn>);

  <c- b>Promise</c->&lt;<c- b>void</c->> <a class="idl-code" data-link-type="method" href="#dom-fakexrdevice-disconnect" id="ref-for-dom-fakexrdevice-disconnect"><c- g>disconnect</c-></a>();

  <c- b>void</c-> <a class="idl-code" data-link-type="method" href="#dom-fakexrdevice-setviewerorigin" id="ref-for-dom-fakexrdevice-setviewerorigin"><c- g>setViewerOrigin</c-></a>(<a class="n" data-link-type="idl-name" href="#dictdef-fakexrrigidtransforminit" id="ref-for-dictdef-fakexrrigidtransforminit⑥"><c- n>FakeXRRigidTransformInit</c-></a> <dfn class="idl-code" data-dfn-for="FakeXRDevice/setViewerOrigin(origin, emulatedPosition), FakeXRDevice/setViewerOrigin(origin)" data-dfn-type="argument" data-export id="dom-fakexrdevice-setviewerorigin-origin-emulatedposition-origin"><code><c- g>origin</c-></code><a class="self-link" href="#dom-fakexrdevice-setviewerorigin-origin-emulatedposition-origin"></a></dfn>, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean①"><c- b>boolean</c-></a> <dfn class="idl-code" data-dfn-for="FakeXRDevice/setViewerOrigin(origin, emulatedPosition), FakeXRDevice/setViewerOrigin(origin)" data-dfn-type="argument" data-export id="dom-fakexrdevice-setviewerorigin-origin-emulatedposition-emulatedposition"><code><c- g>emulatedPosition</c-></code><a class="self-link" href="#dom-fakexrdevice-setviewerorigin-origin-emulatedposition-emulatedposition"></a></dfn> = <c- b>false</c->);
  <c- b>void</c-> <a class="idl-code" data-link-type="method" href="#dom-fakexrdevice-clearviewerorigin" id="ref-for-dom-fakexrdevice-clearviewerorigin"><c- g>clearViewerOrigin</c-></a>();
  <c- b>void</c-> <a class="idl-code" data-link-type="method" href="#dom-fakexrdevice-setfloororigin" id="ref-for-dom-fakexrdevice-setfloororigin"><c- g>setFloorOrigin</c-></a>(<a class="n" data-link-type="idl-name" href="#dictdef-fakexrrigidtransforminit" id="ref-for-dictdef-fakexrrigidtransforminit⑦"><c- n>FakeXRRigidTransformInit</c-></a> <dfn class="idl-code" data-dfn-for="FakeXRDevice/setFloorOrigin(origin)" data-dfn-type="argument" data-export id="dom-fakexrdevice-setfloororigin-origin-origin"><code><c- g>origin</c-></code><a class="self-link" href="#dom-fakexrdevice-setfloororigin-origin-origin"></a></dfn>);
  <c- b>void</c-> <a class="idl-code" data-link-type="method" href="#dom-fakexrdevice-clearfloororigin" id="ref-for-dom-fakexrdevice-clearfloororigin"><c- g>clearFloorOrigin</c-></a>();
  <c- b>void</c-> <a class="idl-code" data-link-type="method" href="#dom-fakexrdevice-setboundsgeometry" id="ref-for-dom-fakexrdevice-setboundsgeometry"><c- g>setBoundsGeometry</c-></a>(<c- b>sequence</c->&lt;<a class="n" data-link-type="idl-name" href="#dictdef-fakexrboundspoint" id="ref-for-dictdef-fakexrboundspoint①"><c- n>FakeXRBoundsPoint</c-></a>> <dfn class="idl-code" data-dfn-for="FakeXRDevice/setBoundsGeometry(boundsCoordinates)" data-dfn-type="argument" data-export id="dom-fakexrdevice-setboundsgeometry-boundscoordinates-boundscoordinates"><code><c- g>boundsCoordinates</c-></code><a class="self-link" href="#dom-fakexrdevice-setboundsgeometry-boundscoordinates-boundscoordinates"></a></dfn>);
  <c- b>void</c-> <a class="idl-code" data-link-type="method" href="#dom-fakexrdevice-simulateresetpose" id="ref-for-dom-fakexrdevice-simulateresetpose"><c- g>simulateResetPose</c-></a>();

  <c- b>void</c-> <a class="idl-code" data-link-type="method" href="#dom-fakexrdevice-simulatevisibilitychange" id="ref-for-dom-fakexrdevice-simulatevisibilitychange"><c- g>simulateVisibilityChange</c-></a>(<a class="n" data-link-type="idl-name"><c- n>XRVisibilityState</c-></a> <dfn class="idl-code" data-dfn-for="FakeXRDevice/simulateVisibilityChange(state)" data-dfn-type="argument" data-export id="dom-fakexrdevice-simulatevisibilitychange-state-state"><code><c- g>state</c-></code><a class="self-link" href="#dom-fakexrdevice-simulatevisibilitychange-state-state"></a></dfn>);

  <a class="n" data-link-type="idl-name" href="#fakexrinputcontroller" id="ref-for-fakexrinputcontroller"><c- n>FakeXRInputController</c-></a> <dfn class="idl-code" data-dfn-for="FakeXRDevice" data-dfn-type="method" data-export data-lt="simulateInputSourceConnection(init)" id="dom-fakexrdevice-simulateinputsourceconnection"><code><c- g>simulateInputSourceConnection</c-></code><a class="self-link" href="#dom-fakexrdevice-simulateinputsourceconnection"></a></dfn>(<a class="n" data-link-type="idl-name" href="#dictdef-fakexrinputsourceinit" id="ref-for-dictdef-fakexrinputsourceinit"><c- n>FakeXRInputSourceInit</c-></a> <dfn class="idl-code" data-dfn-for="FakeXRDevice/simulateInputSourceConnection(init)" data-dfn-type="argument" data-export id="dom-fakexrdevice-simulateinputsourceconnection-init-init"><code><c- g>init</c-></code><a class="self-link" href="#dom-fakexrdevice-simulateinputsourceconnection-init-init"></a></dfn>);

  // Hit test extensions:
  <c- b>void</c-> <dfn class="idl-code" data-dfn-for="FakeXRDevice" data-dfn-type="method" data-export data-lt="setWorld(world)" id="dom-fakexrdevice-setworld"><code><c- g>setWorld</c-></code><a class="self-link" href="#dom-fakexrdevice-setworld"></a></dfn>(<a class="n" data-link-type="idl-name" href="#dictdef-fakexrworldinit" id="ref-for-dictdef-fakexrworldinit①"><c- n>FakeXRWorldInit</c-></a> <dfn class="idl-code" data-dfn-for="FakeXRDevice/setWorld(world)" data-dfn-type="argument" data-export id="dom-fakexrdevice-setworld-world-world"><code><c- g>world</c-></code><a class="self-link" href="#dom-fakexrdevice-setworld-world-world"></a></dfn>);
  <c- b>void</c-> <dfn class="idl-code" data-dfn-for="FakeXRDevice" data-dfn-type="method" data-export data-lt="clearWorld()" id="dom-fakexrdevice-clearworld"><code><c- g>clearWorld</c-></code><a class="self-link" href="#dom-fakexrdevice-clearworld"></a></dfn>();
};

</pre>
   <p>Each <code class="idl"><a data-link-type="idl" href="#fakexrdevice" id="ref-for-fakexrdevice③">FakeXRDevice</a></code> object has an associated <dfn class="dfn-paneled" data-dfn-for="FakeXRDevice" data-dfn-type="dfn" data-noexport id="fakexrdevice-device">device</dfn>, which is a <a data-link-type="dfn" href="#simulated-xr-device" id="ref-for-simulated-xr-device①③">simulated XR device</a> that it is able to control.</p>
   <div class="algorithm" data-algorithm="next-animation-frame">
    <p>Operations on the <code class="idl"><a data-link-type="idl" href="#fakexrdevice" id="ref-for-fakexrdevice④">FakeXRDevice</a></code>'s <a data-link-type="dfn" href="#fakexrdevice-device" id="ref-for-fakexrdevice-device①">device</a> typically take place on the <dfn class="dfn-paneled" data-dfn-for="XRSession" data-dfn-type="dfn" data-noexport id="xrsession-next-animation-frame">next animation frame</dfn>, i.e. they are not immediately observable until a future <code class="idl"><a data-link-type="idl">requestAnimationFrame()</a></code> callback.</p>
    <p>To determine when this frame is, for a given operation, choose a frame based on the following:</p>
    <dl class="switch">
     <dt>If such an operation is triggered within an <a data-link-type="dfn">XR animation frame</a>:
     <dd>Choose the next <a data-link-type="dfn">XR animation frame</a>, whenever it may occur
     <dt>If such an operation is triggered outside of an <a data-link-type="dfn">XR animation frame</a>:
     <dd>
      Choose a frame based on the following: 
      <dl class="switch">
       <dt>If there are no callbacks in the <a data-link-type="dfn">list of animation frame callbacks</a>:
       <dd>Choose the next <a data-link-type="dfn">XR animation frame</a>, whenever it may occur
       <dt>Otherwise:
       <dd>Choose the next-to-next <a data-link-type="dfn">XR animation frame</a>, whenever it may occur
      </dl>
    </dl>
    <p class="note" role="note"><span>NOTE:</span> The reason we defer an extra frame when there are pending animation frame callbacks is to avoid having to deal with potential race conditions when the device is ready to trigger an animation frame callback, but has not yet. In practice, this means that tests should be written so that they wait until they have performed all such operations <i>before</i> calling the next <code class="idl"><a data-link-type="idl">requestAnimationFrame()</a></code></p>
   </div>
   <div class="algorithm" data-algorithm="set-views">
     The <dfn class="dfn-paneled idl-code" data-dfn-for="FakeXRDevice" data-dfn-type="method" data-export id="dom-fakexrdevice-setviews"><code>setViews(<var>views</var>)</code></dfn> method performs the following steps: 
    <ol>
     <li data-md>
      <p>On the <a data-link-type="dfn" href="#xrsession-next-animation-frame" id="ref-for-xrsession-next-animation-frame">next animation frame</a>, run the following steps:</p>
      <ol>
       <li data-md>
        <p>Let <var>l</var> be an empty <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-list">list</a>.</p>
       <li data-md>
        <p>For each <var>view</var> in <var>views</var>:</p>
        <ol>
         <li data-md>
          <p>Let <var>v</var> be the result of running <a data-link-type="dfn" href="#parse-a-view" id="ref-for-parse-a-view②">parse a view</a> on <var>view</var>.</p>
         <li data-md>
          <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-append" id="ref-for-list-append①">Append</a> <var>v</var> to <var>l</var>.</p>
        </ol>
       <li data-md>
        <p>Set <a data-link-type="dfn" href="#fakexrdevice-device" id="ref-for-fakexrdevice-device②">device</a>'s list of views to <var>l</var>.</p>
      </ol>
    </ol>
   </div>
   <div class="algorithm" data-algorithm="disconnect">
    <p>When <dfn class="dfn-paneled idl-code" data-dfn-for="FakeXRDevice" data-dfn-type="method" data-export id="dom-fakexrdevice-disconnect"><code>disconnect()</code></dfn> method is called, perform the following steps:</p>
    <ol>
     <li data-md>
      <p>Remove <a data-link-type="dfn" href="#fakexrdevice-device" id="ref-for-fakexrdevice-device③">device</a> from the <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#context-object" id="ref-for-context-object①">context object</a>'s <code class="idl"><a data-link-type="idl">XR</a></code> object’s <a data-link-type="dfn">list of immersive XR devices</a> as if it were disconnected.</p>
     <li data-md>
      <p>If the <a data-link-type="dfn">inline XR device</a> is equal to the <code class="idl"><a data-link-type="idl" href="#fakexrdevice" id="ref-for-fakexrdevice⑤">FakeXRDevice</a></code>, reset it to the default <a data-link-type="dfn">inline XR device</a>.</p>
    </ol>
   </div>
   <div class="algorithm" data-algorithm="set-viewer-origin">
     The <dfn class="dfn-paneled idl-code" data-dfn-for="FakeXRDevice" data-dfn-type="method" data-export data-lt="setViewerOrigin(origin, emulatedPosition)|setViewerOrigin(origin)" id="dom-fakexrdevice-setviewerorigin"><code>setViewerOrigin(<var>origin</var>, <var>emulatedPosition</var>)</code></dfn> performs the following steps: 
    <ol>
     <li data-md>
      <p>Let <var>o</var> be the result of running <a data-link-type="dfn" href="#parse-a-rigid-transform" id="ref-for-parse-a-rigid-transform①">parse a rigid transform</a> on <var>origin</var>.</p>
     <li data-md>
      <p>On the <a data-link-type="dfn" href="#xrsession-next-animation-frame" id="ref-for-xrsession-next-animation-frame①">next animation frame</a>, perform the following steps:</p>
      <ol>
       <li data-md>
        <p>Set <a data-link-type="dfn" href="#fakexrdevice-device" id="ref-for-fakexrdevice-device④">device</a>'s <a data-link-type="dfn" href="#simulated-xr-device-viewer-origin" id="ref-for-simulated-xr-device-viewer-origin①">viewer origin</a> to <var>o</var>.</p>
       <li data-md>
        <p>Set <a data-link-type="dfn" href="#fakexrdevice-device" id="ref-for-fakexrdevice-device⑤">device</a>'s <a data-link-type="dfn" href="#simulated-xr-device-emulated-position-boolean" id="ref-for-simulated-xr-device-emulated-position-boolean">emulated position boolean</a> to <var>emulatedPosition</var>.</p>
      </ol>
    </ol>
   </div>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="FakeXRDevice" data-dfn-type="method" data-export id="dom-fakexrdevice-clearviewerorigin"><code>clearViewerOrigin()</code></dfn> method will, on the <a data-link-type="dfn" href="#xrsession-next-animation-frame" id="ref-for-xrsession-next-animation-frame②">next animation frame</a>, set <a data-link-type="dfn" href="#fakexrdevice-device" id="ref-for-fakexrdevice-device⑥">device</a>'s <a data-link-type="dfn" href="#simulated-xr-device-viewer-origin" id="ref-for-simulated-xr-device-viewer-origin②">viewer origin</a> to <code>null</code>.</p>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="FakeXRDevice" data-dfn-type="method" data-export id="dom-fakexrdevice-simulatevisibilitychange"><code>simulateVisibilityChange(<var>state</var>)</code></dfn> method will, as soon as possible, set <a data-link-type="dfn" href="#fakexrdevice-device" id="ref-for-fakexrdevice-device⑦">device</a>'s <a data-link-type="dfn" href="#simulated-xr-device-visibility-state" id="ref-for-simulated-xr-device-visibility-state">visibility state</a> to <var>state</var>.</p>
   <div class="algorithm" data-algorithm="set-floor-origin">
     The <dfn class="dfn-paneled idl-code" data-dfn-for="FakeXRDevice" data-dfn-type="method" data-export id="dom-fakexrdevice-setfloororigin"><code>setFloorOrigin(<var>origin</var>)</code></dfn> performs the following steps: 
    <ol>
     <li data-md>
      <p>Let <var>o</var> be the result of running <a data-link-type="dfn" href="#parse-a-rigid-transform" id="ref-for-parse-a-rigid-transform②">parse a rigid transform</a> on <var>origin</var>.</p>
     <li data-md>
      <p>On the <a data-link-type="dfn" href="#xrsession-next-animation-frame" id="ref-for-xrsession-next-animation-frame③">next animation frame</a>, set <a data-link-type="dfn" href="#fakexrdevice-device" id="ref-for-fakexrdevice-device⑧">device</a>'s <a data-link-type="dfn" href="#simulated-xr-device-floor-origin" id="ref-for-simulated-xr-device-floor-origin①">floor origin</a> to <var>o</var>.</p>
    </ol>
   </div>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="FakeXRDevice" data-dfn-type="method" data-export id="dom-fakexrdevice-clearfloororigin"><code>clearFloorOrigin()</code></dfn> method will, on the <a data-link-type="dfn" href="#xrsession-next-animation-frame" id="ref-for-xrsession-next-animation-frame④">next animation frame</a>, set <a data-link-type="dfn" href="#fakexrdevice-device" id="ref-for-fakexrdevice-device⑨">device</a>'s <a data-link-type="dfn" href="#simulated-xr-device-floor-origin" id="ref-for-simulated-xr-device-floor-origin②">floor origin</a> to <code>null</code>.</p>
   <div class="algorithm" data-algorithm="set-bounds-geometry">
     The <dfn class="dfn-paneled idl-code" data-dfn-for="FakeXRDevice" data-dfn-type="method" data-export id="dom-fakexrdevice-setboundsgeometry"><code>setBoundsGeometry(<var>boundsCoordinates</var>)</code></dfn> performs the following steps: 
    <ol>
     <li data-md>
      <p>If <var>boundsCoordinates</var> has fewer than 3 elements, throw a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#exceptiondef-typeerror" id="ref-for-exceptiondef-typeerror④">TypeError</a></code>.</p>
     <li data-md>
      <p>On the <a data-link-type="dfn" href="#xrsession-next-animation-frame" id="ref-for-xrsession-next-animation-frame⑤">next animation frame</a>, set <a data-link-type="dfn" href="#fakexrdevice-device" id="ref-for-fakexrdevice-device①⓪">device</a>'s <a data-link-type="dfn" href="#simulated-xr-device-native-bounds-geometry" id="ref-for-simulated-xr-device-native-bounds-geometry①">native bounds geometry</a> to <var>boundsCoordinates</var>.</p>
    </ol>
   </div>
   <p>The <dfn class="dfn-paneled idl-code" data-dfn-for="FakeXRDevice" data-dfn-type="method" data-export id="dom-fakexrdevice-simulateresetpose"><code>simulateResetPose()</code></dfn> method will, as soon as possible, behave as if the <a data-link-type="dfn" href="#fakexrdevice-device" id="ref-for-fakexrdevice-device①①">device</a>'s <a data-link-type="dfn">viewer</a>'s <a data-link-type="dfn">native origin</a> had a discontinuity, triggering appropriate <code class="idl"><a data-link-type="idl">reset</a></code> events.</p>
   <h3 class="heading settled" data-level="5.2" id="fakexrinputcontroller-init"><span class="secno">5.2. </span><span class="content">FakeXRInputController</span><a class="self-link" href="#fakexrinputcontroller-init"></a></h3>
<pre class="idl highlight def"><c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-fakexrinputsourceinit"><code><c- g>FakeXRInputSourceInit</c-></code></dfn> {
  <c- b>required</c-> <a class="n" data-link-type="idl-name"><c- n>XRHandedness</c-></a> <dfn class="idl-code" data-dfn-for="FakeXRInputSourceInit" data-dfn-type="dict-member" data-export data-type="XRHandedness " id="dom-fakexrinputsourceinit-handedness"><code><c- g>handedness</c-></code><a class="self-link" href="#dom-fakexrinputsourceinit-handedness"></a></dfn>;
  <c- b>required</c-> <a class="n" data-link-type="idl-name"><c- n>XRTargetRayMode</c-></a> <dfn class="idl-code" data-dfn-for="FakeXRInputSourceInit" data-dfn-type="dict-member" data-export data-type="XRTargetRayMode " id="dom-fakexrinputsourceinit-targetraymode"><code><c- g>targetRayMode</c-></code><a class="self-link" href="#dom-fakexrinputsourceinit-targetraymode"></a></dfn>;
  <c- b>required</c-> <a class="n" data-link-type="idl-name" href="#dictdef-fakexrrigidtransforminit" id="ref-for-dictdef-fakexrrigidtransforminit⑧"><c- n>FakeXRRigidTransformInit</c-></a> <dfn class="idl-code" data-dfn-for="FakeXRInputSourceInit" data-dfn-type="dict-member" data-export data-type="FakeXRRigidTransformInit " id="dom-fakexrinputsourceinit-pointerorigin"><code><c- g>pointerOrigin</c-></code><a class="self-link" href="#dom-fakexrinputsourceinit-pointerorigin"></a></dfn>;
  <c- b>required</c-> <c- b>sequence</c->&lt;<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DOMString" id="ref-for-idl-DOMString"><c- b>DOMString</c-></a>> <dfn class="idl-code" data-dfn-for="FakeXRInputSourceInit" data-dfn-type="dict-member" data-export data-type="sequence<DOMString> " id="dom-fakexrinputsourceinit-profiles"><code><c- g>profiles</c-></code><a class="self-link" href="#dom-fakexrinputsourceinit-profiles"></a></dfn>;
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean②"><c- b>boolean</c-></a> <dfn class="idl-code" data-default="false" data-dfn-for="FakeXRInputSourceInit" data-dfn-type="dict-member" data-export data-type="boolean " id="dom-fakexrinputsourceinit-selectionstarted"><code><c- g>selectionStarted</c-></code><a class="self-link" href="#dom-fakexrinputsourceinit-selectionstarted"></a></dfn> = <c- b>false</c->;
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean③"><c- b>boolean</c-></a> <dfn class="idl-code" data-default="false" data-dfn-for="FakeXRInputSourceInit" data-dfn-type="dict-member" data-export data-type="boolean " id="dom-fakexrinputsourceinit-selectionclicked"><code><c- g>selectionClicked</c-></code><a class="self-link" href="#dom-fakexrinputsourceinit-selectionclicked"></a></dfn> = <c- b>false</c->;
  <c- b>sequence</c->&lt;<a class="n" data-link-type="idl-name" href="#dictdef-fakexrbuttonstateinit" id="ref-for-dictdef-fakexrbuttonstateinit"><c- n>FakeXRButtonStateInit</c-></a>> <dfn class="idl-code" data-dfn-for="FakeXRInputSourceInit" data-dfn-type="dict-member" data-export data-type="sequence<FakeXRButtonStateInit> " id="dom-fakexrinputsourceinit-supportedbuttons"><code><c- g>supportedButtons</c-></code><a class="self-link" href="#dom-fakexrinputsourceinit-supportedbuttons"></a></dfn>;
  <a class="n" data-link-type="idl-name" href="#dictdef-fakexrrigidtransforminit" id="ref-for-dictdef-fakexrrigidtransforminit⑨"><c- n>FakeXRRigidTransformInit</c-></a> <dfn class="idl-code" data-dfn-for="FakeXRInputSourceInit" data-dfn-type="dict-member" data-export data-type="FakeXRRigidTransformInit " id="dom-fakexrinputsourceinit-griporigin"><code><c- g>gripOrigin</c-></code><a class="self-link" href="#dom-fakexrinputsourceinit-griporigin"></a></dfn>;
};

<c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="fakexrinputcontroller"><code><c- g>FakeXRInputController</c-></code></dfn> {
  <c- b>void</c-> <dfn class="idl-code" data-dfn-for="FakeXRInputController" data-dfn-type="method" data-export data-lt="setHandedness(handedness)" id="dom-fakexrinputcontroller-sethandedness"><code><c- g>setHandedness</c-></code><a class="self-link" href="#dom-fakexrinputcontroller-sethandedness"></a></dfn>(<a class="n" data-link-type="idl-name"><c- n>XRHandedness</c-></a> <dfn class="idl-code" data-dfn-for="FakeXRInputController/setHandedness(handedness)" data-dfn-type="argument" data-export id="dom-fakexrinputcontroller-sethandedness-handedness-handedness"><code><c- g>handedness</c-></code><a class="self-link" href="#dom-fakexrinputcontroller-sethandedness-handedness-handedness"></a></dfn>);
  <c- b>void</c-> <dfn class="idl-code" data-dfn-for="FakeXRInputController" data-dfn-type="method" data-export data-lt="setTargetRayMode(targetRayMode)" id="dom-fakexrinputcontroller-settargetraymode"><code><c- g>setTargetRayMode</c-></code><a class="self-link" href="#dom-fakexrinputcontroller-settargetraymode"></a></dfn>(<a class="n" data-link-type="idl-name"><c- n>XRTargetRayMode</c-></a> <dfn class="idl-code" data-dfn-for="FakeXRInputController/setTargetRayMode(targetRayMode)" data-dfn-type="argument" data-export id="dom-fakexrinputcontroller-settargetraymode-targetraymode-targetraymode"><code><c- g>targetRayMode</c-></code><a class="self-link" href="#dom-fakexrinputcontroller-settargetraymode-targetraymode-targetraymode"></a></dfn>);
  <c- b>void</c-> <dfn class="idl-code" data-dfn-for="FakeXRInputController" data-dfn-type="method" data-export data-lt="setProfiles(profiles)" id="dom-fakexrinputcontroller-setprofiles"><code><c- g>setProfiles</c-></code><a class="self-link" href="#dom-fakexrinputcontroller-setprofiles"></a></dfn>(<c- b>sequence</c->&lt;<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DOMString" id="ref-for-idl-DOMString①"><c- b>DOMString</c-></a>> <dfn class="idl-code" data-dfn-for="FakeXRInputController/setProfiles(profiles)" data-dfn-type="argument" data-export id="dom-fakexrinputcontroller-setprofiles-profiles-profiles"><code><c- g>profiles</c-></code><a class="self-link" href="#dom-fakexrinputcontroller-setprofiles-profiles-profiles"></a></dfn>);
  <c- b>void</c-> <dfn class="idl-code" data-dfn-for="FakeXRInputController" data-dfn-type="method" data-export data-lt="setGripOrigin(gripOrigin, emulatedPosition)|setGripOrigin(gripOrigin)" id="dom-fakexrinputcontroller-setgriporigin"><code><c- g>setGripOrigin</c-></code><a class="self-link" href="#dom-fakexrinputcontroller-setgriporigin"></a></dfn>(<a class="n" data-link-type="idl-name" href="#dictdef-fakexrrigidtransforminit" id="ref-for-dictdef-fakexrrigidtransforminit①⓪"><c- n>FakeXRRigidTransformInit</c-></a> <dfn class="idl-code" data-dfn-for="FakeXRInputController/setGripOrigin(gripOrigin, emulatedPosition), FakeXRInputController/setGripOrigin(gripOrigin)" data-dfn-type="argument" data-export id="dom-fakexrinputcontroller-setgriporigin-griporigin-emulatedposition-griporigin"><code><c- g>gripOrigin</c-></code><a class="self-link" href="#dom-fakexrinputcontroller-setgriporigin-griporigin-emulatedposition-griporigin"></a></dfn>, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean④"><c- b>boolean</c-></a> <dfn class="idl-code" data-dfn-for="FakeXRInputController/setGripOrigin(gripOrigin, emulatedPosition), FakeXRInputController/setGripOrigin(gripOrigin)" data-dfn-type="argument" data-export id="dom-fakexrinputcontroller-setgriporigin-griporigin-emulatedposition-emulatedposition"><code><c- g>emulatedPosition</c-></code><a class="self-link" href="#dom-fakexrinputcontroller-setgriporigin-griporigin-emulatedposition-emulatedposition"></a></dfn> = <c- b>false</c->);
  <c- b>void</c-> <dfn class="idl-code" data-dfn-for="FakeXRInputController" data-dfn-type="method" data-export data-lt="clearGripOrigin()" id="dom-fakexrinputcontroller-cleargriporigin"><code><c- g>clearGripOrigin</c-></code><a class="self-link" href="#dom-fakexrinputcontroller-cleargriporigin"></a></dfn>();
  <c- b>void</c-> <dfn class="idl-code" data-dfn-for="FakeXRInputController" data-dfn-type="method" data-export data-lt="setPointerOrigin(pointerOrigin, emulatedPosition)|setPointerOrigin(pointerOrigin)" id="dom-fakexrinputcontroller-setpointerorigin"><code><c- g>setPointerOrigin</c-></code><a class="self-link" href="#dom-fakexrinputcontroller-setpointerorigin"></a></dfn>(<a class="n" data-link-type="idl-name" href="#dictdef-fakexrrigidtransforminit" id="ref-for-dictdef-fakexrrigidtransforminit①①"><c- n>FakeXRRigidTransformInit</c-></a> <dfn class="idl-code" data-dfn-for="FakeXRInputController/setPointerOrigin(pointerOrigin, emulatedPosition), FakeXRInputController/setPointerOrigin(pointerOrigin)" data-dfn-type="argument" data-export id="dom-fakexrinputcontroller-setpointerorigin-pointerorigin-emulatedposition-pointerorigin"><code><c- g>pointerOrigin</c-></code><a class="self-link" href="#dom-fakexrinputcontroller-setpointerorigin-pointerorigin-emulatedposition-pointerorigin"></a></dfn>, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean⑤"><c- b>boolean</c-></a> <dfn class="idl-code" data-dfn-for="FakeXRInputController/setPointerOrigin(pointerOrigin, emulatedPosition), FakeXRInputController/setPointerOrigin(pointerOrigin)" data-dfn-type="argument" data-export id="dom-fakexrinputcontroller-setpointerorigin-pointerorigin-emulatedposition-emulatedposition"><code><c- g>emulatedPosition</c-></code><a class="self-link" href="#dom-fakexrinputcontroller-setpointerorigin-pointerorigin-emulatedposition-emulatedposition"></a></dfn> = <c- b>false</c->);

  <c- b>void</c-> <dfn class="idl-code" data-dfn-for="FakeXRInputController" data-dfn-type="method" data-export data-lt="disconnect()" id="dom-fakexrinputcontroller-disconnect"><code><c- g>disconnect</c-></code><a class="self-link" href="#dom-fakexrinputcontroller-disconnect"></a></dfn>();
  <c- b>void</c-> <dfn class="idl-code" data-dfn-for="FakeXRInputController" data-dfn-type="method" data-export data-lt="reconnect()" id="dom-fakexrinputcontroller-reconnect"><code><c- g>reconnect</c-></code><a class="self-link" href="#dom-fakexrinputcontroller-reconnect"></a></dfn>();

  <c- b>void</c-> <dfn class="idl-code" data-dfn-for="FakeXRInputController" data-dfn-type="method" data-export data-lt="startSelection()" id="dom-fakexrinputcontroller-startselection"><code><c- g>startSelection</c-></code><a class="self-link" href="#dom-fakexrinputcontroller-startselection"></a></dfn>();
  <c- b>void</c-> <dfn class="idl-code" data-dfn-for="FakeXRInputController" data-dfn-type="method" data-export data-lt="endSelection()" id="dom-fakexrinputcontroller-endselection"><code><c- g>endSelection</c-></code><a class="self-link" href="#dom-fakexrinputcontroller-endselection"></a></dfn>();
  <c- b>void</c-> <dfn class="idl-code" data-dfn-for="FakeXRInputController" data-dfn-type="method" data-export data-lt="simulateSelect()" id="dom-fakexrinputcontroller-simulateselect"><code><c- g>simulateSelect</c-></code><a class="self-link" href="#dom-fakexrinputcontroller-simulateselect"></a></dfn>();

  <c- b>void</c-> <dfn class="idl-code" data-dfn-for="FakeXRInputController" data-dfn-type="method" data-export data-lt="setSupportedButtons(supportedButtons)" id="dom-fakexrinputcontroller-setsupportedbuttons"><code><c- g>setSupportedButtons</c-></code><a class="self-link" href="#dom-fakexrinputcontroller-setsupportedbuttons"></a></dfn>(<c- b>sequence</c->&lt;<a class="n" data-link-type="idl-name" href="#dictdef-fakexrbuttonstateinit" id="ref-for-dictdef-fakexrbuttonstateinit①"><c- n>FakeXRButtonStateInit</c-></a>> <dfn class="idl-code" data-dfn-for="FakeXRInputController/setSupportedButtons(supportedButtons)" data-dfn-type="argument" data-export id="dom-fakexrinputcontroller-setsupportedbuttons-supportedbuttons-supportedbuttons"><code><c- g>supportedButtons</c-></code><a class="self-link" href="#dom-fakexrinputcontroller-setsupportedbuttons-supportedbuttons-supportedbuttons"></a></dfn>);
  <c- b>void</c-> <dfn class="idl-code" data-dfn-for="FakeXRInputController" data-dfn-type="method" data-export data-lt="updateButtonState(buttonState)" id="dom-fakexrinputcontroller-updatebuttonstate"><code><c- g>updateButtonState</c-></code><a class="self-link" href="#dom-fakexrinputcontroller-updatebuttonstate"></a></dfn>(<a class="n" data-link-type="idl-name" href="#dictdef-fakexrbuttonstateinit" id="ref-for-dictdef-fakexrbuttonstateinit②"><c- n>FakeXRButtonStateInit</c-></a> <dfn class="idl-code" data-dfn-for="FakeXRInputController/updateButtonState(buttonState)" data-dfn-type="argument" data-export id="dom-fakexrinputcontroller-updatebuttonstate-buttonstate-buttonstate"><code><c- g>buttonState</c-></code><a class="self-link" href="#dom-fakexrinputcontroller-updatebuttonstate-buttonstate-buttonstate"></a></dfn>);
};

<c- b>enum</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="enum" data-export id="enumdef-fakexrbuttontype"><code><c- g>FakeXRButtonType</c-></code></dfn> {
  <dfn class="idl-code" data-dfn-for="FakeXRButtonType" data-dfn-type="enum-value" data-export id="dom-fakexrbuttontype-grip"><code><c- s>"grip"</c-></code><a class="self-link" href="#dom-fakexrbuttontype-grip"></a></dfn>,
  <dfn class="idl-code" data-dfn-for="FakeXRButtonType" data-dfn-type="enum-value" data-export id="dom-fakexrbuttontype-touchpad"><code><c- s>"touchpad"</c-></code><a class="self-link" href="#dom-fakexrbuttontype-touchpad"></a></dfn>,
  <dfn class="idl-code" data-dfn-for="FakeXRButtonType" data-dfn-type="enum-value" data-export id="dom-fakexrbuttontype-thumbstick"><code><c- s>"thumbstick"</c-></code><a class="self-link" href="#dom-fakexrbuttontype-thumbstick"></a></dfn>,
  <dfn class="idl-code" data-dfn-for="FakeXRButtonType" data-dfn-type="enum-value" data-export id="dom-fakexrbuttontype-optional-button"><code><c- s>"optional-button"</c-></code><a class="self-link" href="#dom-fakexrbuttontype-optional-button"></a></dfn>,
  <dfn class="idl-code" data-dfn-for="FakeXRButtonType" data-dfn-type="enum-value" data-export id="dom-fakexrbuttontype-optional-thumbstick"><code><c- s>"optional-thumbstick"</c-></code><a class="self-link" href="#dom-fakexrbuttontype-optional-thumbstick"></a></dfn>
};

<c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-fakexrbuttonstateinit"><code><c- g>FakeXRButtonStateInit</c-></code></dfn> {
  <c- b>required</c-> <a class="n" data-link-type="idl-name" href="#enumdef-fakexrbuttontype" id="ref-for-enumdef-fakexrbuttontype"><c- n>FakeXRButtonType</c-></a> <dfn class="idl-code" data-dfn-for="FakeXRButtonStateInit" data-dfn-type="dict-member" data-export data-type="FakeXRButtonType " id="dom-fakexrbuttonstateinit-buttontype"><code><c- g>buttonType</c-></code><a class="self-link" href="#dom-fakexrbuttonstateinit-buttontype"></a></dfn>;
  <c- b>required</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean⑥"><c- b>boolean</c-></a> <dfn class="idl-code" data-dfn-for="FakeXRButtonStateInit" data-dfn-type="dict-member" data-export data-type="boolean " id="dom-fakexrbuttonstateinit-pressed"><code><c- g>pressed</c-></code><a class="self-link" href="#dom-fakexrbuttonstateinit-pressed"></a></dfn>;
  <c- b>required</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean⑦"><c- b>boolean</c-></a> <dfn class="idl-code" data-dfn-for="FakeXRButtonStateInit" data-dfn-type="dict-member" data-export data-type="boolean " id="dom-fakexrbuttonstateinit-touched"><code><c- g>touched</c-></code><a class="self-link" href="#dom-fakexrbuttonstateinit-touched"></a></dfn>;
  <c- b>required</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-float" id="ref-for-idl-float⑦"><c- b>float</c-></a> <dfn class="idl-code" data-dfn-for="FakeXRButtonStateInit" data-dfn-type="dict-member" data-export data-type="float " id="dom-fakexrbuttonstateinit-pressedvalue"><code><c- g>pressedValue</c-></code><a class="self-link" href="#dom-fakexrbuttonstateinit-pressedvalue"></a></dfn>;
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-float" id="ref-for-idl-float⑧"><c- b>float</c-></a> <dfn class="idl-code" data-default="0.0" data-dfn-for="FakeXRButtonStateInit" data-dfn-type="dict-member" data-export data-type="float " id="dom-fakexrbuttonstateinit-xvalue"><code><c- g>xValue</c-></code><a class="self-link" href="#dom-fakexrbuttonstateinit-xvalue"></a></dfn> = 0.0;
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-float" id="ref-for-idl-float⑨"><c- b>float</c-></a> <dfn class="idl-code" data-default="0.0" data-dfn-for="FakeXRButtonStateInit" data-dfn-type="dict-member" data-export data-type="float " id="dom-fakexrbuttonstateinit-yvalue"><code><c- g>yValue</c-></code><a class="self-link" href="#dom-fakexrbuttonstateinit-yvalue"></a></dfn> = 0.0;
};
</pre>
   <h2 class="heading settled" data-level="6" id="hit-test-extensions"><span class="secno">6. </span><span class="content">Hit test extensions</span><a class="self-link" href="#hit-test-extensions"></a></h2>
   <p>The hit test extensions for test API SHOULD be implemented by all user agents that implement <a href="https://immersive-web.github.io/hit-test/">WebXR Hit Test Module</a>.</p>
<pre class="idl highlight def"><c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-fakexrworldinit"><code><c- g>FakeXRWorldInit</c-></code></dfn> {
  <c- b>required</c-> <c- b>sequence</c->&lt;<a class="n" data-link-type="idl-name" href="#dictdef-fakexrregioninit" id="ref-for-dictdef-fakexrregioninit"><c- n>FakeXRRegionInit</c-></a>> <dfn class="dfn-paneled idl-code" data-dfn-for="FakeXRWorldInit" data-dfn-type="dict-member" data-export data-type="sequence<FakeXRRegionInit> " id="dom-fakexrworldinit-hittestregions"><code><c- g>hitTestRegions</c-></code></dfn>;
};

</pre>
   <p><code class="idl"><a data-link-type="idl" href="#dictdef-fakexrworldinit" id="ref-for-dictdef-fakexrworldinit②">FakeXRWorldInit</a></code> dictionary describes the state of the world that will be used when computing hit test results on a <code class="idl"><a data-link-type="idl" href="#fakexrdevice" id="ref-for-fakexrdevice⑥">FakeXRDevice</a></code>.</p>
   <p><code class="idl"><a data-link-type="idl" href="#dom-fakexrworldinit-hittestregions" id="ref-for-dom-fakexrworldinit-hittestregions">hitTestRegions</a></code> contains a collection of <code class="idl"><a data-link-type="idl" href="#dictdef-fakexrregioninit" id="ref-for-dictdef-fakexrregioninit①">FakeXRRegionInit</a></code>s that are used to describe specific regions of the fake world. The order of the regions does not matter.</p>
<pre class="idl highlight def"><c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-fakexrregioninit"><code><c- g>FakeXRRegionInit</c-></code></dfn> {
  <c- b>required</c-> <c- b>sequence</c->&lt;<a class="n" data-link-type="idl-name" href="#dictdef-fakexrtriangleinit" id="ref-for-dictdef-fakexrtriangleinit"><c- n>FakeXRTriangleInit</c-></a>> <dfn class="dfn-paneled idl-code" data-dfn-for="FakeXRRegionInit" data-dfn-type="dict-member" data-export data-type="sequence<FakeXRTriangleInit> " id="dom-fakexrregioninit-faces"><code><c- g>faces</c-></code></dfn>;
  <c- b>required</c-> <a class="n" data-link-type="idl-name" href="#enumdef-fakexrregiontype" id="ref-for-enumdef-fakexrregiontype"><c- n>FakeXRRegionType</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="FakeXRRegionInit" data-dfn-type="dict-member" data-export data-type="FakeXRRegionType " id="dom-fakexrregioninit-type"><code><c- g>type</c-></code></dfn>;
};

</pre>
   <p><code class="idl"><a data-link-type="idl" href="#dictdef-fakexrregioninit" id="ref-for-dictdef-fakexrregioninit②">FakeXRRegionInit</a></code> dictionary describes the contents of a specific region of the world.</p>
   <p><code class="idl"><a data-link-type="idl" href="#dom-fakexrregioninit-faces" id="ref-for-dom-fakexrregioninit-faces">faces</a></code> contains a collection of <code class="idl"><a data-link-type="idl" href="#dictdef-fakexrtriangleinit" id="ref-for-dictdef-fakexrtriangleinit①">FakeXRTriangleInit</a></code>s that enumerate all the faces contained by the region. The order of the faces does not matter.</p>
   <p><code class="idl"><a data-link-type="idl" href="#dom-fakexrregioninit-type" id="ref-for-dom-fakexrregioninit-type">type</a></code> contains a type of the region that will be used during computation of hit test results.</p>
<pre class="idl highlight def"><c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-fakexrtriangleinit"><code><c- g>FakeXRTriangleInit</c-></code></dfn> {
  <c- b>required</c-> <c- b>sequence</c->&lt;<a class="n" data-link-type="idl-name" href="https://drafts.fxtf.org/geometry-1/#dictdef-dompointinit" id="ref-for-dictdef-dompointinit②"><c- n>DOMPointInit</c-></a>> <dfn class="dfn-paneled idl-code" data-dfn-for="FakeXRTriangleInit" data-dfn-type="dict-member" data-export data-type="sequence<DOMPointInit> " id="dom-fakexrtriangleinit-vertices"><code><c- g>vertices</c-></code></dfn>;  // size = 3
};

</pre>
   <p><code class="idl"><a data-link-type="idl" href="#dictdef-fakexrtriangleinit" id="ref-for-dictdef-fakexrtriangleinit②">FakeXRTriangleInit</a></code> dictionary describes a single face of a region.</p>
   <p><code class="idl"><a data-link-type="idl" href="#dom-fakexrtriangleinit-vertices" id="ref-for-dom-fakexrtriangleinit-vertices">vertices</a></code> contains a collection of <code class="idl"><a data-link-type="idl" href="https://drafts.fxtf.org/geometry-1/#dictdef-dompointinit" id="ref-for-dictdef-dompointinit③">DOMPointInit</a></code>s that comprise the face. The face will be considered as solid when computing hit test results and as such, the winding order of the vertices does not matter.</p>
<pre class="idl highlight def"><c- b>enum</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="enum" data-export id="enumdef-fakexrregiontype"><code><c- g>FakeXRRegionType</c-></code></dfn> {
  <dfn class="idl-code" data-dfn-for="FakeXRRegionType" data-dfn-type="enum-value" data-export id="dom-fakexrregiontype-point"><code><c- s>"point"</c-></code><a class="self-link" href="#dom-fakexrregiontype-point"></a></dfn>,
  <dfn class="idl-code" data-dfn-for="FakeXRRegionType" data-dfn-type="enum-value" data-export id="dom-fakexrregiontype-plane"><code><c- s>"plane"</c-></code><a class="self-link" href="#dom-fakexrregiontype-plane"></a></dfn>,
  <dfn class="idl-code" data-dfn-for="FakeXRRegionType" data-dfn-type="enum-value" data-export id="dom-fakexrregiontype-mesh"><code><c- s>"mesh"</c-></code><a class="self-link" href="#dom-fakexrregiontype-mesh"></a></dfn>
};

</pre>
   <p><code class="idl"><a data-link-type="idl" href="#enumdef-fakexrregiontype" id="ref-for-enumdef-fakexrregiontype①">FakeXRRegionType</a></code> enum is used to describe a type of the world region.</p>
   <p id="back-to-top" role="navigation"><a href="#toc"><abbr title="Back to Top">↑</abbr></a></p>
<script src="https://www.w3.org/scripts/TR/2016/fixup.js"></script>
  </main>
  <h2 class="no-num no-ref heading settled" id="index"><span class="content">Index</span><a class="self-link" href="#index"></a></h2>
  <h3 class="no-num no-ref heading settled" id="index-defined-here"><span class="content">Terms defined by this specification</span><a class="self-link" href="#index-defined-here"></a></h3>
  <ul class="index">
   <li><a href="#dom-fakexrdeviceinit-boundscoordinates">boundsCoordinates</a><span>, in §4.3</span>
   <li><a href="#dom-fakexrbuttonstateinit-buttontype">buttonType</a><span>, in §5.2</span>
   <li><a href="#dom-fakexrdevice-clearfloororigin">clearFloorOrigin()</a><span>, in §5.1</span>
   <li><a href="#dom-fakexrinputcontroller-cleargriporigin">clearGripOrigin()</a><span>, in §5.2</span>
   <li><a href="#dom-fakexrdevice-clearviewerorigin">clearViewerOrigin()</a><span>, in §5.1</span>
   <li><a href="#dom-fakexrdevice-clearworld">clearWorld()</a><span>, in §5.1</span>
   <li><a href="#fakexrdevice-device">device</a><span>, in §5.1</span>
   <li><a href="#view-device-resolution">device resolution</a><span>, in §3</span>
   <li>
    disconnect()
    <ul>
     <li><a href="#dom-fakexrdevice-disconnect">method for FakeXRDevice</a><span>, in §5.1</span>
     <li><a href="#dom-fakexrinputcontroller-disconnect">method for FakeXRInputController</a><span>, in §5.2</span>
    </ul>
   <li><a href="#dom-xrtest-disconnectalldevices">disconnectAllDevices()</a><span>, in §4.2</span>
   <li><a href="#dom-fakexrfieldofviewinit-downdegrees">downDegrees</a><span>, in §4.3</span>
   <li><a href="#simulated-xr-device-emulated-position-boolean">emulated position boolean</a><span>, in §3</span>
   <li><a href="#dom-fakexrinputcontroller-endselection">endSelection()</a><span>, in §5.2</span>
   <li><a href="#dom-fakexrviewinit-eye">eye</a><span>, in §4.3</span>
   <li><a href="#dom-fakexrregioninit-faces">faces</a><span>, in §6</span>
   <li><a href="#dictdef-fakexrboundspoint">FakeXRBoundsPoint</a><span>, in §4.3</span>
   <li><a href="#dictdef-fakexrbuttonstateinit">FakeXRButtonStateInit</a><span>, in §5.2</span>
   <li><a href="#enumdef-fakexrbuttontype">FakeXRButtonType</a><span>, in §5.2</span>
   <li><a href="#fakexrdevice">FakeXRDevice</a><span>, in §5.1</span>
   <li><a href="#dictdef-fakexrdeviceinit">FakeXRDeviceInit</a><span>, in §4.3</span>
   <li><a href="#dictdef-fakexrdeviceresolution">FakeXRDeviceResolution</a><span>, in §4.3</span>
   <li><a href="#dictdef-fakexrfieldofviewinit">FakeXRFieldOfViewInit</a><span>, in §4.3</span>
   <li><a href="#fakexrinputcontroller">FakeXRInputController</a><span>, in §5.2</span>
   <li><a href="#dictdef-fakexrinputsourceinit">FakeXRInputSourceInit</a><span>, in §5.2</span>
   <li><a href="#dictdef-fakexrregioninit">FakeXRRegionInit</a><span>, in §6</span>
   <li><a href="#enumdef-fakexrregiontype">FakeXRRegionType</a><span>, in §6</span>
   <li><a href="#dictdef-fakexrrigidtransforminit">FakeXRRigidTransformInit</a><span>, in §4.3</span>
   <li><a href="#dictdef-fakexrtriangleinit">FakeXRTriangleInit</a><span>, in §6</span>
   <li><a href="#dictdef-fakexrviewinit">FakeXRViewInit</a><span>, in §4.3</span>
   <li><a href="#dictdef-fakexrworldinit">FakeXRWorldInit</a><span>, in §6</span>
   <li><a href="#dom-fakexrviewinit-fieldofview">fieldOfView</a><span>, in §4.3</span>
   <li><a href="#view-field-of-view">field of view</a><span>, in §3</span>
   <li><a href="#dom-fakexrdeviceinit-floororigin">floorOrigin</a><span>, in §4.3</span>
   <li><a href="#simulated-xr-device-floor-origin">floor origin</a><span>, in §3</span>
   <li><a href="#dom-fakexrbuttontype-grip">"grip"</a><span>, in §5.2</span>
   <li><a href="#dom-fakexrinputsourceinit-griporigin">gripOrigin</a><span>, in §5.2</span>
   <li><a href="#dom-fakexrinputsourceinit-handedness">handedness</a><span>, in §5.2</span>
   <li><a href="#dom-fakexrdeviceresolution-height">height</a><span>, in §4.3</span>
   <li><a href="#dom-fakexrworldinit-hittestregions">hitTestRegions</a><span>, in §6</span>
   <li><a href="#dom-fakexrfieldofviewinit-leftdegrees">leftDegrees</a><span>, in §4.3</span>
   <li><a href="#dom-fakexrregiontype-mesh">"mesh"</a><span>, in §6</span>
   <li><a href="#simulated-xr-device-native-bounds-geometry">native bounds geometry</a><span>, in §3</span>
   <li><a href="#xrsession-next-animation-frame">next animation frame</a><span>, in §5.1</span>
   <li><a href="#dom-fakexrbuttontype-optional-button">"optional-button"</a><span>, in §5.2</span>
   <li><a href="#dom-fakexrbuttontype-optional-thumbstick">"optional-thumbstick"</a><span>, in §5.2</span>
   <li><a href="#dom-fakexrrigidtransforminit-orientation">orientation</a><span>, in §4.3</span>
   <li><a href="#parse-a-rigid-transform">parse a rigid transform</a><span>, in §4.3</span>
   <li><a href="#parse-a-view">parse a view</a><span>, in §4.3</span>
   <li><a href="#dom-fakexrregiontype-plane">"plane"</a><span>, in §6</span>
   <li><a href="#dom-fakexrregiontype-point">"point"</a><span>, in §6</span>
   <li><a href="#dom-fakexrinputsourceinit-pointerorigin">pointerOrigin</a><span>, in §5.2</span>
   <li><a href="#dom-fakexrrigidtransforminit-position">position</a><span>, in §4.3</span>
   <li><a href="#dom-fakexrbuttonstateinit-pressed">pressed</a><span>, in §5.2</span>
   <li><a href="#dom-fakexrbuttonstateinit-pressedvalue">pressedValue</a><span>, in §5.2</span>
   <li><a href="#dom-fakexrinputsourceinit-profiles">profiles</a><span>, in §5.2</span>
   <li><a href="#dom-fakexrviewinit-projectionmatrix">projectionMatrix</a><span>, in §4.3</span>
   <li><a href="#dom-fakexrinputcontroller-reconnect">reconnect()</a><span>, in §5.2</span>
   <li><a href="#dom-fakexrviewinit-resolution">resolution</a><span>, in §4.3</span>
   <li><a href="#dom-fakexrfieldofviewinit-rightdegrees">rightDegrees</a><span>, in §4.3</span>
   <li><a href="#dom-fakexrinputsourceinit-selectionclicked">selectionClicked</a><span>, in §5.2</span>
   <li><a href="#dom-fakexrinputsourceinit-selectionstarted">selectionStarted</a><span>, in §5.2</span>
   <li><a href="#dom-fakexrdevice-setboundsgeometry">setBoundsGeometry(boundsCoordinates)</a><span>, in §5.1</span>
   <li><a href="#dom-fakexrdevice-setfloororigin">setFloorOrigin(origin)</a><span>, in §5.1</span>
   <li><a href="#dom-fakexrinputcontroller-setgriporigin">setGripOrigin(gripOrigin)</a><span>, in §5.2</span>
   <li><a href="#dom-fakexrinputcontroller-setgriporigin">setGripOrigin(gripOrigin, emulatedPosition)</a><span>, in §5.2</span>
   <li><a href="#dom-fakexrinputcontroller-sethandedness">setHandedness(handedness)</a><span>, in §5.2</span>
   <li><a href="#dom-fakexrinputcontroller-setpointerorigin">setPointerOrigin(pointerOrigin)</a><span>, in §5.2</span>
   <li><a href="#dom-fakexrinputcontroller-setpointerorigin">setPointerOrigin(pointerOrigin, emulatedPosition)</a><span>, in §5.2</span>
   <li><a href="#dom-fakexrinputcontroller-setprofiles">setProfiles(profiles)</a><span>, in §5.2</span>
   <li><a href="#dom-fakexrinputcontroller-setsupportedbuttons">setSupportedButtons(supportedButtons)</a><span>, in §5.2</span>
   <li><a href="#dom-fakexrinputcontroller-settargetraymode">setTargetRayMode(targetRayMode)</a><span>, in §5.2</span>
   <li><a href="#dom-fakexrdevice-setviewerorigin">setViewerOrigin(origin)</a><span>, in §5.1</span>
   <li><a href="#dom-fakexrdevice-setviewerorigin">setViewerOrigin(origin, emulatedPosition)</a><span>, in §5.1</span>
   <li><a href="#dom-fakexrdevice-setviews">setViews(views)</a><span>, in §5.1</span>
   <li><a href="#dom-fakexrdevice-setworld">setWorld(world)</a><span>, in §5.1</span>
   <li><a href="#dom-xrtest-simulatedeviceconnection">simulateDeviceConnection(init)</a><span>, in §4.2</span>
   <li><a href="#simulated-xr-device">simulated XR device</a><span>, in §3</span>
   <li><a href="#dom-fakexrdevice-simulateinputsourceconnection">simulateInputSourceConnection(init)</a><span>, in §5.1</span>
   <li><a href="#dom-fakexrdevice-simulateresetpose">simulateResetPose()</a><span>, in §5.1</span>
   <li><a href="#dom-fakexrinputcontroller-simulateselect">simulateSelect()</a><span>, in §5.2</span>
   <li><a href="#dom-xrtest-simulateuseractivation">simulateUserActivation(f)</a><span>, in §4.2</span>
   <li><a href="#dom-fakexrdevice-simulatevisibilitychange">simulateVisibilityChange(state)</a><span>, in §5.1</span>
   <li><a href="#dom-fakexrinputcontroller-startselection">startSelection()</a><span>, in §5.2</span>
   <li><a href="#dom-fakexrinputsourceinit-supportedbuttons">supportedButtons</a><span>, in §5.2</span>
   <li><a href="#dom-fakexrdeviceinit-supportedfeatures">supportedFeatures</a><span>, in §4.3</span>
   <li><a href="#dom-fakexrdeviceinit-supportedmodes">supportedModes</a><span>, in §4.3</span>
   <li><a href="#dom-fakexrdeviceinit-supportsimmersive">supportsImmersive</a><span>, in §4.3</span>
   <li><a href="#dom-fakexrinputsourceinit-targetraymode">targetRayMode</a><span>, in §5.2</span>
   <li><a href="#dom-xr-test">test</a><span>, in §4.1</span>
   <li><a href="#dom-fakexrbuttontype-thumbstick">"thumbstick"</a><span>, in §5.2</span>
   <li><a href="#dom-fakexrbuttonstateinit-touched">touched</a><span>, in §5.2</span>
   <li><a href="#dom-fakexrbuttontype-touchpad">"touchpad"</a><span>, in §5.2</span>
   <li><a href="#dom-fakexrregioninit-type">type</a><span>, in §6</span>
   <li><a href="#dom-fakexrinputcontroller-updatebuttonstate">updateButtonState(buttonState)</a><span>, in §5.2</span>
   <li><a href="#dom-fakexrfieldofviewinit-updegrees">upDegrees</a><span>, in §4.3</span>
   <li><a href="#dom-fakexrtriangleinit-vertices">vertices</a><span>, in §6</span>
   <li><a href="#dom-fakexrdeviceinit-viewerorigin">viewerOrigin</a><span>, in §4.3</span>
   <li><a href="#simulated-xr-device-viewer-origin">viewer origin</a><span>, in §3</span>
   <li><a href="#dom-fakexrviewinit-viewoffset">viewOffset</a><span>, in §4.3</span>
   <li><a href="#dom-fakexrdeviceinit-views">views</a><span>, in §4.3</span>
   <li><a href="#simulated-xr-device-visibility-state">visibility state</a><span>, in §3</span>
   <li><a href="#dom-fakexrdeviceresolution-width">width</a><span>, in §4.3</span>
   <li><a href="#dom-fakexrdeviceinit-world">world</a><span>, in §4.3</span>
   <li><a href="#dom-fakexrboundspoint-x">x</a><span>, in §4.3</span>
   <li><a href="#xrtest">XRTest</a><span>, in §4.2</span>
   <li><a href="#dom-fakexrbuttonstateinit-xvalue">xValue</a><span>, in §5.2</span>
   <li><a href="#dom-fakexrbuttonstateinit-yvalue">yValue</a><span>, in §5.2</span>
   <li><a href="#dom-fakexrboundspoint-z">z</a><span>, in §4.3</span>
  </ul>
  <aside class="dfn-panel" data-for="term-for-context-object">
   <a href="https://dom.spec.whatwg.org/#context-object">https://dom.spec.whatwg.org/#context-object</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-context-object">4.2. XRTest</a>
    <li><a href="#ref-for-context-object①">5.1. FakeXRDevice</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-dictdef-dompointinit">
   <a href="https://drafts.fxtf.org/geometry-1/#dictdef-dompointinit">https://drafts.fxtf.org/geometry-1/#dictdef-dompointinit</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dictdef-dompointinit">4.3. FakeXRDeviceInit</a> <a href="#ref-for-dictdef-dompointinit①">(2)</a>
    <li><a href="#ref-for-dictdef-dompointinit②">6. Hit test extensions</a> <a href="#ref-for-dictdef-dompointinit③">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-dompointreadonly">
   <a href="https://drafts.fxtf.org/geometry-1/#dompointreadonly">https://drafts.fxtf.org/geometry-1/#dompointreadonly</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dompointreadonly">3. Simulated devices</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-dom-dompointinit-w">
   <a href="https://drafts.fxtf.org/geometry-1/#dom-dompointinit-w">https://drafts.fxtf.org/geometry-1/#dom-dompointinit-w</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-dompointinit-w">4.3. FakeXRDeviceInit</a> <a href="#ref-for-dom-dompointinit-w①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-dom-dompointinit-x">
   <a href="https://drafts.fxtf.org/geometry-1/#dom-dompointinit-x">https://drafts.fxtf.org/geometry-1/#dom-dompointinit-x</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-dompointinit-x">4.3. FakeXRDeviceInit</a> <a href="#ref-for-dom-dompointinit-x①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-dom-dompointinit-y">
   <a href="https://drafts.fxtf.org/geometry-1/#dom-dompointinit-y">https://drafts.fxtf.org/geometry-1/#dom-dompointinit-y</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-dompointinit-y">4.3. FakeXRDeviceInit</a> <a href="#ref-for-dom-dompointinit-y①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-dom-dompointinit-z">
   <a href="https://drafts.fxtf.org/geometry-1/#dom-dompointinit-z">https://drafts.fxtf.org/geometry-1/#dom-dompointinit-z</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-dompointinit-z">4.3. FakeXRDeviceInit</a> <a href="#ref-for-dom-dompointinit-z①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-in-parallel">
   <a href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel">https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-in-parallel">4.2. XRTest</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-triggered-by-user-activation">
   <a href="https://html.spec.whatwg.org/multipage/interaction.html#triggered-by-user-activation">https://html.spec.whatwg.org/multipage/interaction.html#triggered-by-user-activation</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-triggered-by-user-activation">4.2. XRTest</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-list-append">
   <a href="https://infra.spec.whatwg.org/#list-append">https://infra.spec.whatwg.org/#list-append</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-list-append">4.2. XRTest</a>
    <li><a href="#ref-for-list-append①">5.1. FakeXRDevice</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-list">
   <a href="https://infra.spec.whatwg.org/#list">https://infra.spec.whatwg.org/#list</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-list">5.1. FakeXRDevice</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-a-new-promise">
   <a href="https://www.w3.org/2001/tag/doc/promises-guide/#a-new-promise">https://www.w3.org/2001/tag/doc/promises-guide/#a-new-promise</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-a-new-promise">4.2. XRTest</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-resolve-promise">
   <a href="https://www.w3.org/2001/tag/doc/promises-guide/#resolve-promise">https://www.w3.org/2001/tag/doc/promises-guide/#resolve-promise</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-resolve-promise">4.2. XRTest</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-idl-DOMString">
   <a href="https://heycam.github.io/webidl/#idl-DOMString">https://heycam.github.io/webidl/#idl-DOMString</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-idl-DOMString">5.2. FakeXRInputController</a> <a href="#ref-for-idl-DOMString①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-Function">
   <a href="https://heycam.github.io/webidl/#Function">https://heycam.github.io/webidl/#Function</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-Function">4.2. XRTest</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-SameObject">
   <a href="https://heycam.github.io/webidl/#SameObject">https://heycam.github.io/webidl/#SameObject</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-SameObject">4.1. navigator.xr.test</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-exceptiondef-typeerror">
   <a href="https://heycam.github.io/webidl/#exceptiondef-typeerror">https://heycam.github.io/webidl/#exceptiondef-typeerror</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-exceptiondef-typeerror">4.2. XRTest</a>
    <li><a href="#ref-for-exceptiondef-typeerror①">4.3. FakeXRDeviceInit</a> <a href="#ref-for-exceptiondef-typeerror②">(2)</a> <a href="#ref-for-exceptiondef-typeerror③">(3)</a>
    <li><a href="#ref-for-exceptiondef-typeerror④">5.1. FakeXRDevice</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-idl-boolean">
   <a href="https://heycam.github.io/webidl/#idl-boolean">https://heycam.github.io/webidl/#idl-boolean</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-idl-boolean">4.3. FakeXRDeviceInit</a>
    <li><a href="#ref-for-idl-boolean①">5.1. FakeXRDevice</a>
    <li><a href="#ref-for-idl-boolean②">5.2. FakeXRInputController</a> <a href="#ref-for-idl-boolean③">(2)</a> <a href="#ref-for-idl-boolean④">(3)</a> <a href="#ref-for-idl-boolean⑤">(4)</a> <a href="#ref-for-idl-boolean⑥">(5)</a> <a href="#ref-for-idl-boolean⑦">(6)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-idl-double">
   <a href="https://heycam.github.io/webidl/#idl-double">https://heycam.github.io/webidl/#idl-double</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-idl-double">4.3. FakeXRDeviceInit</a> <a href="#ref-for-idl-double①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-idl-float">
   <a href="https://heycam.github.io/webidl/#idl-float">https://heycam.github.io/webidl/#idl-float</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-idl-float">4.3. FakeXRDeviceInit</a> <a href="#ref-for-idl-float①">(2)</a> <a href="#ref-for-idl-float②">(3)</a> <a href="#ref-for-idl-float③">(4)</a> <a href="#ref-for-idl-float④">(5)</a> <a href="#ref-for-idl-float⑤">(6)</a> <a href="#ref-for-idl-float⑥">(7)</a>
    <li><a href="#ref-for-idl-float⑦">5.2. FakeXRInputController</a> <a href="#ref-for-idl-float⑧">(2)</a> <a href="#ref-for-idl-float⑨">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-idl-long">
   <a href="https://heycam.github.io/webidl/#idl-long">https://heycam.github.io/webidl/#idl-long</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-idl-long">4.3. FakeXRDeviceInit</a> <a href="#ref-for-idl-long①">(2)</a>
   </ul>
  </aside>
  <h3 class="no-num no-ref heading settled" id="index-defined-elsewhere"><span class="content">Terms defined by reference</span><a class="self-link" href="#index-defined-elsewhere"></a></h3>
  <ul class="index">
   <li>
    <a data-link-type="biblio">[DOM]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-context-object" style="color:initial">context object</span>
    </ul>
   <li>
    <a data-link-type="biblio">[geometry-1]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-dictdef-dompointinit" style="color:initial">DOMPointInit</span>
     <li><span class="dfn-paneled" id="term-for-dompointreadonly" style="color:initial">DOMPointReadOnly</span>
     <li><span class="dfn-paneled" id="term-for-dom-dompointinit-w" style="color:initial">w</span>
     <li><span class="dfn-paneled" id="term-for-dom-dompointinit-x" style="color:initial">x</span>
     <li><span class="dfn-paneled" id="term-for-dom-dompointinit-y" style="color:initial">y</span>
     <li><span class="dfn-paneled" id="term-for-dom-dompointinit-z" style="color:initial">z</span>
    </ul>
   <li>
    <a data-link-type="biblio">[HTML]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-in-parallel" style="color:initial">in parallel</span>
     <li><span class="dfn-paneled" id="term-for-triggered-by-user-activation" style="color:initial">triggered by user activation</span>
    </ul>
   <li>
    <a data-link-type="biblio">[INFRA]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-list-append" style="color:initial">append</span>
     <li><span class="dfn-paneled" id="term-for-list" style="color:initial">list</span>
    </ul>
   <li>
    <a data-link-type="biblio">[promises-guide]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-a-new-promise" style="color:initial">a new promise</span>
     <li><span class="dfn-paneled" id="term-for-resolve-promise" style="color:initial">resolve</span>
    </ul>
   <li>
    <a data-link-type="biblio">[WebIDL]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-idl-DOMString" style="color:initial">DOMString</span>
     <li><span class="dfn-paneled" id="term-for-Function" style="color:initial">Function</span>
     <li><span class="dfn-paneled" id="term-for-SameObject" style="color:initial">SameObject</span>
     <li><span class="dfn-paneled" id="term-for-exceptiondef-typeerror" style="color:initial">TypeError</span>
     <li><span class="dfn-paneled" id="term-for-idl-boolean" style="color:initial">boolean</span>
     <li><span class="dfn-paneled" id="term-for-idl-double" style="color:initial">double</span>
     <li><span class="dfn-paneled" id="term-for-idl-float" style="color:initial">float</span>
     <li><span class="dfn-paneled" id="term-for-idl-long" style="color:initial">long</span>
    </ul>
  </ul>
  <h2 class="no-num no-ref heading settled" id="references"><span class="content">References</span><a class="self-link" href="#references"></a></h2>
  <h3 class="no-num no-ref heading settled" id="normative"><span class="content">Normative References</span><a class="self-link" href="#normative"></a></h3>
  <dl>
   <dt id="biblio-dom">[DOM]
   <dd>Anne van Kesteren. <a href="https://dom.spec.whatwg.org/">DOM Standard</a>. Living Standard. URL: <a href="https://dom.spec.whatwg.org/">https://dom.spec.whatwg.org/</a>
   <dt id="biblio-geometry-1">[GEOMETRY-1]
   <dd>Simon Pieters; Chris Harrelson. <a href="https://www.w3.org/TR/geometry-1/">Geometry Interfaces Module Level 1</a>. 4 December 2018. CR. URL: <a href="https://www.w3.org/TR/geometry-1/">https://www.w3.org/TR/geometry-1/</a>
   <dt id="biblio-html">[HTML]
   <dd>Anne van Kesteren; et al. <a href="https://html.spec.whatwg.org/multipage/">HTML Standard</a>. Living Standard. URL: <a href="https://html.spec.whatwg.org/multipage/">https://html.spec.whatwg.org/multipage/</a>
   <dt id="biblio-infra">[INFRA]
   <dd>Anne van Kesteren; Domenic Denicola. <a href="https://infra.spec.whatwg.org/">Infra Standard</a>. Living Standard. URL: <a href="https://infra.spec.whatwg.org/">https://infra.spec.whatwg.org/</a>
   <dt id="biblio-promises-guide">[PROMISES-GUIDE]
   <dd>Domenic Denicola. <a href="https://www.w3.org/2001/tag/doc/promises-guide">Writing Promise-Using Specifications</a>. 9 November 2018. TAG Finding. URL: <a href="https://www.w3.org/2001/tag/doc/promises-guide">https://www.w3.org/2001/tag/doc/promises-guide</a>
   <dt id="biblio-webidl">[WebIDL]
   <dd>Boris Zbarsky. <a href="https://heycam.github.io/webidl/">Web IDL</a>. 15 December 2016. ED. URL: <a href="https://heycam.github.io/webidl/">https://heycam.github.io/webidl/</a>
  </dl>
  <h2 class="no-num no-ref heading settled" id="idl-index"><span class="content">IDL Index</span><a class="self-link" href="#idl-index"></a></h2>
<pre class="idl highlight def"><c- b>partial</c-> <c- b>interface</c-> <a class="idl-code" data-link-type="interface"><c- g>XR</c-></a> {
    [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject①"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#xrtest" id="ref-for-xrtest③"><c- n>XRTest</c-></a> <a class="idl-code" data-link-type="attribute" data-readonly data-type="XRTest" href="#dom-xr-test" id="ref-for-dom-xr-test①"><c- g>test</c-></a>;
};

<c- b>interface</c-> <a href="#xrtest"><code><c- g>XRTest</c-></code></a> {
  <c- b>Promise</c->&lt;<a class="n" data-link-type="idl-name" href="#fakexrdevice" id="ref-for-fakexrdevice①①"><c- n>FakeXRDevice</c-></a>> <a class="idl-code" data-link-type="method" href="#dom-xrtest-simulatedeviceconnection" id="ref-for-dom-xrtest-simulatedeviceconnection①"><c- g>simulateDeviceConnection</c-></a>(<a class="n" data-link-type="idl-name" href="#dictdef-fakexrdeviceinit" id="ref-for-dictdef-fakexrdeviceinit①"><c- n>FakeXRDeviceInit</c-></a> <a href="#dom-xrtest-simulatedeviceconnection-init-init"><code><c- g>init</c-></code></a>);
  <c- b>void</c-> <a class="idl-code" data-link-type="method" href="#dom-xrtest-simulateuseractivation" id="ref-for-dom-xrtest-simulateuseractivation①"><c- g>simulateUserActivation</c-></a>(<a class="n" data-link-type="idl-name" href="https://heycam.github.io/webidl/#Function" id="ref-for-Function①"><c- n>Function</c-></a> <a href="#dom-xrtest-simulateuseractivation-f-f"><code><c- g>f</c-></code></a>);
  <c- b>Promise</c->&lt;<c- b>void</c->> <a class="idl-code" data-link-type="method" href="#dom-xrtest-disconnectalldevices" id="ref-for-dom-xrtest-disconnectalldevices①"><c- g>disconnectAllDevices</c-></a>();
};

<c- b>dictionary</c-> <a href="#dictdef-fakexrdeviceinit"><code><c- g>FakeXRDeviceInit</c-></code></a> {
    <c- b>required</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean⑧"><c- b>boolean</c-></a> <a data-type="boolean " href="#dom-fakexrdeviceinit-supportsimmersive"><code><c- g>supportsImmersive</c-></code></a>;
    <c- b>sequence</c->&lt;<a class="n" data-link-type="idl-name"><c- n>XRSessionMode</c-></a>> <a data-type="sequence<XRSessionMode> " href="#dom-fakexrdeviceinit-supportedmodes"><code><c- g>supportedModes</c-></code></a>;
    <c- b>required</c-> <c- b>sequence</c->&lt;<a class="n" data-link-type="idl-name" href="#dictdef-fakexrviewinit" id="ref-for-dictdef-fakexrviewinit③"><c- n>FakeXRViewInit</c-></a>> <a data-type="sequence<FakeXRViewInit> " href="#dom-fakexrdeviceinit-views"><code><c- g>views</c-></code></a>;

    <c- b>sequence</c->&lt;<c- b>any</c->> <a data-type="sequence<any> " href="#dom-fakexrdeviceinit-supportedfeatures"><code><c- g>supportedFeatures</c-></code></a>;
    <c- b>sequence</c->&lt;<a class="n" data-link-type="idl-name" href="#dictdef-fakexrboundspoint" id="ref-for-dictdef-fakexrboundspoint②"><c- n>FakeXRBoundsPoint</c-></a>> <a data-type="sequence<FakeXRBoundsPoint> " href="#dom-fakexrdeviceinit-boundscoordinates"><code><c- g>boundsCoordinates</c-></code></a>;
    <a class="n" data-link-type="idl-name" href="#dictdef-fakexrrigidtransforminit" id="ref-for-dictdef-fakexrrigidtransforminit②①"><c- n>FakeXRRigidTransformInit</c-></a> <a data-type="FakeXRRigidTransformInit " href="#dom-fakexrdeviceinit-floororigin"><code><c- g>floorOrigin</c-></code></a>;
    <a class="n" data-link-type="idl-name" href="#dictdef-fakexrrigidtransforminit" id="ref-for-dictdef-fakexrrigidtransforminit③①"><c- n>FakeXRRigidTransformInit</c-></a> <a data-type="FakeXRRigidTransformInit " href="#dom-fakexrdeviceinit-viewerorigin"><code><c- g>viewerOrigin</c-></code></a>;

    // Hit test extensions:
    <a class="n" data-link-type="idl-name" href="#dictdef-fakexrworldinit" id="ref-for-dictdef-fakexrworldinit③"><c- n>FakeXRWorldInit</c-></a> <a data-type="FakeXRWorldInit " href="#dom-fakexrdeviceinit-world"><code><c- g>world</c-></code></a>;
};

<c- b>dictionary</c-> <a href="#dictdef-fakexrviewinit"><code><c- g>FakeXRViewInit</c-></code></a> {
  <c- b>required</c-> <a class="n" data-link-type="idl-name"><c- n>XREye</c-></a> <a data-type="XREye " href="#dom-fakexrviewinit-eye"><code><c- g>eye</c-></code></a>;
  <c- b>required</c-> <c- b>sequence</c->&lt;<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-float" id="ref-for-idl-float①⓪"><c- b>float</c-></a>> <a data-type="sequence<float> " href="#dom-fakexrviewinit-projectionmatrix"><code><c- g>projectionMatrix</c-></code></a>;
  <c- b>required</c-> <a class="n" data-link-type="idl-name" href="#dictdef-fakexrdeviceresolution" id="ref-for-dictdef-fakexrdeviceresolution①①"><c- n>FakeXRDeviceResolution</c-></a> <a data-type="FakeXRDeviceResolution " href="#dom-fakexrviewinit-resolution"><code><c- g>resolution</c-></code></a>;
  <c- b>required</c-> <a class="n" data-link-type="idl-name" href="#dictdef-fakexrrigidtransforminit" id="ref-for-dictdef-fakexrrigidtransforminit④①"><c- n>FakeXRRigidTransformInit</c-></a> <a data-type="FakeXRRigidTransformInit " href="#dom-fakexrviewinit-viewoffset"><code><c- g>viewOffset</c-></code></a>;
  <a class="n" data-link-type="idl-name" href="#dictdef-fakexrfieldofviewinit" id="ref-for-dictdef-fakexrfieldofviewinit①①"><c- n>FakeXRFieldOfViewInit</c-></a> <a data-type="FakeXRFieldOfViewInit " href="#dom-fakexrviewinit-fieldofview"><code><c- g>fieldOfView</c-></code></a>;
};

<c- b>dictionary</c-> <a href="#dictdef-fakexrfieldofviewinit"><code><c- g>FakeXRFieldOfViewInit</c-></code></a> {
  <c- b>required</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-float" id="ref-for-idl-float①①"><c- b>float</c-></a> <a data-type="float " href="#dom-fakexrfieldofviewinit-updegrees"><code><c- g>upDegrees</c-></code></a>;
  <c- b>required</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-float" id="ref-for-idl-float②①"><c- b>float</c-></a> <a data-type="float " href="#dom-fakexrfieldofviewinit-downdegrees"><code><c- g>downDegrees</c-></code></a>;
  <c- b>required</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-float" id="ref-for-idl-float③①"><c- b>float</c-></a> <a data-type="float " href="#dom-fakexrfieldofviewinit-leftdegrees"><code><c- g>leftDegrees</c-></code></a>;
  <c- b>required</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-float" id="ref-for-idl-float④①"><c- b>float</c-></a> <a data-type="float " href="#dom-fakexrfieldofviewinit-rightdegrees"><code><c- g>rightDegrees</c-></code></a>;
};

<c- b>dictionary</c-> <a href="#dictdef-fakexrdeviceresolution"><code><c- g>FakeXRDeviceResolution</c-></code></a> {
    <c- b>required</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-long" id="ref-for-idl-long②"><c- b>long</c-></a> <a data-type="long " href="#dom-fakexrdeviceresolution-width"><code><c- g>width</c-></code></a>;
    <c- b>required</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-long" id="ref-for-idl-long①①"><c- b>long</c-></a> <a data-type="long " href="#dom-fakexrdeviceresolution-height"><code><c- g>height</c-></code></a>;
};

<c- b>dictionary</c-> <a href="#dictdef-fakexrboundspoint"><code><c- g>FakeXRBoundsPoint</c-></code></a> {
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-double" id="ref-for-idl-double②"><c- b>double</c-></a> <a data-type="double " href="#dom-fakexrboundspoint-x"><code><c- g>x</c-></code></a>; <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-double" id="ref-for-idl-double①①"><c- b>double</c-></a> <a data-type="double " href="#dom-fakexrboundspoint-z"><code><c- g>z</c-></code></a>;
};

<c- b>dictionary</c-> <a href="#dictdef-fakexrrigidtransforminit"><code><c- g>FakeXRRigidTransformInit</c-></code></a> {
  <c- b>required</c-> <c- b>sequence</c->&lt;<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-float" id="ref-for-idl-float⑤①"><c- b>float</c-></a>> <a data-type="sequence<float> " href="#dom-fakexrrigidtransforminit-position"><code><c- g>position</c-></code></a>;
  <c- b>required</c-> <c- b>sequence</c->&lt;<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-float" id="ref-for-idl-float⑥①"><c- b>float</c-></a>> <a data-type="sequence<float> " href="#dom-fakexrrigidtransforminit-orientation"><code><c- g>orientation</c-></code></a>;
};


<c- b>interface</c-> <a href="#fakexrdevice"><code><c- g>FakeXRDevice</c-></code></a> {
  <c- b>void</c-> <a class="idl-code" data-link-type="method" href="#dom-fakexrdevice-setviews" id="ref-for-dom-fakexrdevice-setviews①"><c- g>setViews</c-></a>(<c- b>sequence</c->&lt;<a class="n" data-link-type="idl-name" href="#dictdef-fakexrviewinit" id="ref-for-dictdef-fakexrviewinit②①"><c- n>FakeXRViewInit</c-></a>> <a href="#dom-fakexrdevice-setviews-views-views"><code><c- g>views</c-></code></a>);

  <c- b>Promise</c->&lt;<c- b>void</c->> <a class="idl-code" data-link-type="method" href="#dom-fakexrdevice-disconnect" id="ref-for-dom-fakexrdevice-disconnect①"><c- g>disconnect</c-></a>();

  <c- b>void</c-> <a class="idl-code" data-link-type="method" href="#dom-fakexrdevice-setviewerorigin" id="ref-for-dom-fakexrdevice-setviewerorigin①"><c- g>setViewerOrigin</c-></a>(<a class="n" data-link-type="idl-name" href="#dictdef-fakexrrigidtransforminit" id="ref-for-dictdef-fakexrrigidtransforminit⑥①"><c- n>FakeXRRigidTransformInit</c-></a> <a href="#dom-fakexrdevice-setviewerorigin-origin-emulatedposition-origin"><code><c- g>origin</c-></code></a>, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean①①"><c- b>boolean</c-></a> <a href="#dom-fakexrdevice-setviewerorigin-origin-emulatedposition-emulatedposition"><code><c- g>emulatedPosition</c-></code></a> = <c- b>false</c->);
  <c- b>void</c-> <a class="idl-code" data-link-type="method" href="#dom-fakexrdevice-clearviewerorigin" id="ref-for-dom-fakexrdevice-clearviewerorigin①"><c- g>clearViewerOrigin</c-></a>();
  <c- b>void</c-> <a class="idl-code" data-link-type="method" href="#dom-fakexrdevice-setfloororigin" id="ref-for-dom-fakexrdevice-setfloororigin①"><c- g>setFloorOrigin</c-></a>(<a class="n" data-link-type="idl-name" href="#dictdef-fakexrrigidtransforminit" id="ref-for-dictdef-fakexrrigidtransforminit⑦①"><c- n>FakeXRRigidTransformInit</c-></a> <a href="#dom-fakexrdevice-setfloororigin-origin-origin"><code><c- g>origin</c-></code></a>);
  <c- b>void</c-> <a class="idl-code" data-link-type="method" href="#dom-fakexrdevice-clearfloororigin" id="ref-for-dom-fakexrdevice-clearfloororigin①"><c- g>clearFloorOrigin</c-></a>();
  <c- b>void</c-> <a class="idl-code" data-link-type="method" href="#dom-fakexrdevice-setboundsgeometry" id="ref-for-dom-fakexrdevice-setboundsgeometry①"><c- g>setBoundsGeometry</c-></a>(<c- b>sequence</c->&lt;<a class="n" data-link-type="idl-name" href="#dictdef-fakexrboundspoint" id="ref-for-dictdef-fakexrboundspoint①①"><c- n>FakeXRBoundsPoint</c-></a>> <a href="#dom-fakexrdevice-setboundsgeometry-boundscoordinates-boundscoordinates"><code><c- g>boundsCoordinates</c-></code></a>);
  <c- b>void</c-> <a class="idl-code" data-link-type="method" href="#dom-fakexrdevice-simulateresetpose" id="ref-for-dom-fakexrdevice-simulateresetpose①"><c- g>simulateResetPose</c-></a>();

  <c- b>void</c-> <a class="idl-code" data-link-type="method" href="#dom-fakexrdevice-simulatevisibilitychange" id="ref-for-dom-fakexrdevice-simulatevisibilitychange①"><c- g>simulateVisibilityChange</c-></a>(<a class="n" data-link-type="idl-name"><c- n>XRVisibilityState</c-></a> <a href="#dom-fakexrdevice-simulatevisibilitychange-state-state"><code><c- g>state</c-></code></a>);

  <a class="n" data-link-type="idl-name" href="#fakexrinputcontroller" id="ref-for-fakexrinputcontroller①"><c- n>FakeXRInputController</c-></a> <a href="#dom-fakexrdevice-simulateinputsourceconnection"><code><c- g>simulateInputSourceConnection</c-></code></a>(<a class="n" data-link-type="idl-name" href="#dictdef-fakexrinputsourceinit" id="ref-for-dictdef-fakexrinputsourceinit①"><c- n>FakeXRInputSourceInit</c-></a> <a href="#dom-fakexrdevice-simulateinputsourceconnection-init-init"><code><c- g>init</c-></code></a>);

  // Hit test extensions:
  <c- b>void</c-> <a href="#dom-fakexrdevice-setworld"><code><c- g>setWorld</c-></code></a>(<a class="n" data-link-type="idl-name" href="#dictdef-fakexrworldinit" id="ref-for-dictdef-fakexrworldinit①①"><c- n>FakeXRWorldInit</c-></a> <a href="#dom-fakexrdevice-setworld-world-world"><code><c- g>world</c-></code></a>);
  <c- b>void</c-> <a href="#dom-fakexrdevice-clearworld"><code><c- g>clearWorld</c-></code></a>();
};


<c- b>dictionary</c-> <a href="#dictdef-fakexrinputsourceinit"><code><c- g>FakeXRInputSourceInit</c-></code></a> {
  <c- b>required</c-> <a class="n" data-link-type="idl-name"><c- n>XRHandedness</c-></a> <a data-type="XRHandedness " href="#dom-fakexrinputsourceinit-handedness"><code><c- g>handedness</c-></code></a>;
  <c- b>required</c-> <a class="n" data-link-type="idl-name"><c- n>XRTargetRayMode</c-></a> <a data-type="XRTargetRayMode " href="#dom-fakexrinputsourceinit-targetraymode"><code><c- g>targetRayMode</c-></code></a>;
  <c- b>required</c-> <a class="n" data-link-type="idl-name" href="#dictdef-fakexrrigidtransforminit" id="ref-for-dictdef-fakexrrigidtransforminit⑧①"><c- n>FakeXRRigidTransformInit</c-></a> <a data-type="FakeXRRigidTransformInit " href="#dom-fakexrinputsourceinit-pointerorigin"><code><c- g>pointerOrigin</c-></code></a>;
  <c- b>required</c-> <c- b>sequence</c->&lt;<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DOMString" id="ref-for-idl-DOMString②"><c- b>DOMString</c-></a>> <a data-type="sequence<DOMString> " href="#dom-fakexrinputsourceinit-profiles"><code><c- g>profiles</c-></code></a>;
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean②①"><c- b>boolean</c-></a> <a data-default="false" data-type="boolean " href="#dom-fakexrinputsourceinit-selectionstarted"><code><c- g>selectionStarted</c-></code></a> = <c- b>false</c->;
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean③①"><c- b>boolean</c-></a> <a data-default="false" data-type="boolean " href="#dom-fakexrinputsourceinit-selectionclicked"><code><c- g>selectionClicked</c-></code></a> = <c- b>false</c->;
  <c- b>sequence</c->&lt;<a class="n" data-link-type="idl-name" href="#dictdef-fakexrbuttonstateinit" id="ref-for-dictdef-fakexrbuttonstateinit③"><c- n>FakeXRButtonStateInit</c-></a>> <a data-type="sequence<FakeXRButtonStateInit> " href="#dom-fakexrinputsourceinit-supportedbuttons"><code><c- g>supportedButtons</c-></code></a>;
  <a class="n" data-link-type="idl-name" href="#dictdef-fakexrrigidtransforminit" id="ref-for-dictdef-fakexrrigidtransforminit⑨①"><c- n>FakeXRRigidTransformInit</c-></a> <a data-type="FakeXRRigidTransformInit " href="#dom-fakexrinputsourceinit-griporigin"><code><c- g>gripOrigin</c-></code></a>;
};

<c- b>interface</c-> <a href="#fakexrinputcontroller"><code><c- g>FakeXRInputController</c-></code></a> {
  <c- b>void</c-> <a href="#dom-fakexrinputcontroller-sethandedness"><code><c- g>setHandedness</c-></code></a>(<a class="n" data-link-type="idl-name"><c- n>XRHandedness</c-></a> <a href="#dom-fakexrinputcontroller-sethandedness-handedness-handedness"><code><c- g>handedness</c-></code></a>);
  <c- b>void</c-> <a href="#dom-fakexrinputcontroller-settargetraymode"><code><c- g>setTargetRayMode</c-></code></a>(<a class="n" data-link-type="idl-name"><c- n>XRTargetRayMode</c-></a> <a href="#dom-fakexrinputcontroller-settargetraymode-targetraymode-targetraymode"><code><c- g>targetRayMode</c-></code></a>);
  <c- b>void</c-> <a href="#dom-fakexrinputcontroller-setprofiles"><code><c- g>setProfiles</c-></code></a>(<c- b>sequence</c->&lt;<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DOMString" id="ref-for-idl-DOMString①①"><c- b>DOMString</c-></a>> <a href="#dom-fakexrinputcontroller-setprofiles-profiles-profiles"><code><c- g>profiles</c-></code></a>);
  <c- b>void</c-> <a href="#dom-fakexrinputcontroller-setgriporigin"><code><c- g>setGripOrigin</c-></code></a>(<a class="n" data-link-type="idl-name" href="#dictdef-fakexrrigidtransforminit" id="ref-for-dictdef-fakexrrigidtransforminit①⓪①"><c- n>FakeXRRigidTransformInit</c-></a> <a href="#dom-fakexrinputcontroller-setgriporigin-griporigin-emulatedposition-griporigin"><code><c- g>gripOrigin</c-></code></a>, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean④①"><c- b>boolean</c-></a> <a href="#dom-fakexrinputcontroller-setgriporigin-griporigin-emulatedposition-emulatedposition"><code><c- g>emulatedPosition</c-></code></a> = <c- b>false</c->);
  <c- b>void</c-> <a href="#dom-fakexrinputcontroller-cleargriporigin"><code><c- g>clearGripOrigin</c-></code></a>();
  <c- b>void</c-> <a href="#dom-fakexrinputcontroller-setpointerorigin"><code><c- g>setPointerOrigin</c-></code></a>(<a class="n" data-link-type="idl-name" href="#dictdef-fakexrrigidtransforminit" id="ref-for-dictdef-fakexrrigidtransforminit①①①"><c- n>FakeXRRigidTransformInit</c-></a> <a href="#dom-fakexrinputcontroller-setpointerorigin-pointerorigin-emulatedposition-pointerorigin"><code><c- g>pointerOrigin</c-></code></a>, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean⑤①"><c- b>boolean</c-></a> <a href="#dom-fakexrinputcontroller-setpointerorigin-pointerorigin-emulatedposition-emulatedposition"><code><c- g>emulatedPosition</c-></code></a> = <c- b>false</c->);

  <c- b>void</c-> <a href="#dom-fakexrinputcontroller-disconnect"><code><c- g>disconnect</c-></code></a>();
  <c- b>void</c-> <a href="#dom-fakexrinputcontroller-reconnect"><code><c- g>reconnect</c-></code></a>();

  <c- b>void</c-> <a href="#dom-fakexrinputcontroller-startselection"><code><c- g>startSelection</c-></code></a>();
  <c- b>void</c-> <a href="#dom-fakexrinputcontroller-endselection"><code><c- g>endSelection</c-></code></a>();
  <c- b>void</c-> <a href="#dom-fakexrinputcontroller-simulateselect"><code><c- g>simulateSelect</c-></code></a>();

  <c- b>void</c-> <a href="#dom-fakexrinputcontroller-setsupportedbuttons"><code><c- g>setSupportedButtons</c-></code></a>(<c- b>sequence</c->&lt;<a class="n" data-link-type="idl-name" href="#dictdef-fakexrbuttonstateinit" id="ref-for-dictdef-fakexrbuttonstateinit①①"><c- n>FakeXRButtonStateInit</c-></a>> <a href="#dom-fakexrinputcontroller-setsupportedbuttons-supportedbuttons-supportedbuttons"><code><c- g>supportedButtons</c-></code></a>);
  <c- b>void</c-> <a href="#dom-fakexrinputcontroller-updatebuttonstate"><code><c- g>updateButtonState</c-></code></a>(<a class="n" data-link-type="idl-name" href="#dictdef-fakexrbuttonstateinit" id="ref-for-dictdef-fakexrbuttonstateinit②①"><c- n>FakeXRButtonStateInit</c-></a> <a href="#dom-fakexrinputcontroller-updatebuttonstate-buttonstate-buttonstate"><code><c- g>buttonState</c-></code></a>);
};

<c- b>enum</c-> <a href="#enumdef-fakexrbuttontype"><code><c- g>FakeXRButtonType</c-></code></a> {
  <a href="#dom-fakexrbuttontype-grip"><code><c- s>"grip"</c-></code></a>,
  <a href="#dom-fakexrbuttontype-touchpad"><code><c- s>"touchpad"</c-></code></a>,
  <a href="#dom-fakexrbuttontype-thumbstick"><code><c- s>"thumbstick"</c-></code></a>,
  <a href="#dom-fakexrbuttontype-optional-button"><code><c- s>"optional-button"</c-></code></a>,
  <a href="#dom-fakexrbuttontype-optional-thumbstick"><code><c- s>"optional-thumbstick"</c-></code></a>
};

<c- b>dictionary</c-> <a href="#dictdef-fakexrbuttonstateinit"><code><c- g>FakeXRButtonStateInit</c-></code></a> {
  <c- b>required</c-> <a class="n" data-link-type="idl-name" href="#enumdef-fakexrbuttontype" id="ref-for-enumdef-fakexrbuttontype①"><c- n>FakeXRButtonType</c-></a> <a data-type="FakeXRButtonType " href="#dom-fakexrbuttonstateinit-buttontype"><code><c- g>buttonType</c-></code></a>;
  <c- b>required</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean⑥①"><c- b>boolean</c-></a> <a data-type="boolean " href="#dom-fakexrbuttonstateinit-pressed"><code><c- g>pressed</c-></code></a>;
  <c- b>required</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean⑦①"><c- b>boolean</c-></a> <a data-type="boolean " href="#dom-fakexrbuttonstateinit-touched"><code><c- g>touched</c-></code></a>;
  <c- b>required</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-float" id="ref-for-idl-float⑦①"><c- b>float</c-></a> <a data-type="float " href="#dom-fakexrbuttonstateinit-pressedvalue"><code><c- g>pressedValue</c-></code></a>;
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-float" id="ref-for-idl-float⑧①"><c- b>float</c-></a> <a data-default="0.0" data-type="float " href="#dom-fakexrbuttonstateinit-xvalue"><code><c- g>xValue</c-></code></a> = 0.0;
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-float" id="ref-for-idl-float⑨①"><c- b>float</c-></a> <a data-default="0.0" data-type="float " href="#dom-fakexrbuttonstateinit-yvalue"><code><c- g>yValue</c-></code></a> = 0.0;
};

<c- b>dictionary</c-> <a href="#dictdef-fakexrworldinit"><code><c- g>FakeXRWorldInit</c-></code></a> {
  <c- b>required</c-> <c- b>sequence</c->&lt;<a class="n" data-link-type="idl-name" href="#dictdef-fakexrregioninit" id="ref-for-dictdef-fakexrregioninit③"><c- n>FakeXRRegionInit</c-></a>> <a data-type="sequence<FakeXRRegionInit> " href="#dom-fakexrworldinit-hittestregions"><code><c- g>hitTestRegions</c-></code></a>;
};


<c- b>dictionary</c-> <a href="#dictdef-fakexrregioninit"><code><c- g>FakeXRRegionInit</c-></code></a> {
  <c- b>required</c-> <c- b>sequence</c->&lt;<a class="n" data-link-type="idl-name" href="#dictdef-fakexrtriangleinit" id="ref-for-dictdef-fakexrtriangleinit③"><c- n>FakeXRTriangleInit</c-></a>> <a data-type="sequence<FakeXRTriangleInit> " href="#dom-fakexrregioninit-faces"><code><c- g>faces</c-></code></a>;
  <c- b>required</c-> <a class="n" data-link-type="idl-name" href="#enumdef-fakexrregiontype" id="ref-for-enumdef-fakexrregiontype②"><c- n>FakeXRRegionType</c-></a> <a data-type="FakeXRRegionType " href="#dom-fakexrregioninit-type"><code><c- g>type</c-></code></a>;
};


<c- b>dictionary</c-> <a href="#dictdef-fakexrtriangleinit"><code><c- g>FakeXRTriangleInit</c-></code></a> {
  <c- b>required</c-> <c- b>sequence</c->&lt;<a class="n" data-link-type="idl-name" href="https://drafts.fxtf.org/geometry-1/#dictdef-dompointinit" id="ref-for-dictdef-dompointinit②①"><c- n>DOMPointInit</c-></a>> <a data-type="sequence<DOMPointInit> " href="#dom-fakexrtriangleinit-vertices"><code><c- g>vertices</c-></code></a>;  // size = 3
};


<c- b>enum</c-> <a href="#enumdef-fakexrregiontype"><code><c- g>FakeXRRegionType</c-></code></a> {
  <a href="#dom-fakexrregiontype-point"><code><c- s>"point"</c-></code></a>,
  <a href="#dom-fakexrregiontype-plane"><code><c- s>"plane"</c-></code></a>,
  <a href="#dom-fakexrregiontype-mesh"><code><c- s>"mesh"</c-></code></a>
};


</pre>
  <aside class="dfn-panel" data-for="simulated-xr-device">
   <b><a href="#simulated-xr-device">#simulated-xr-device</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-simulated-xr-device">3. Simulated devices</a> <a href="#ref-for-simulated-xr-device①">(2)</a> <a href="#ref-for-simulated-xr-device②">(3)</a> <a href="#ref-for-simulated-xr-device③">(4)</a> <a href="#ref-for-simulated-xr-device④">(5)</a> <a href="#ref-for-simulated-xr-device⑤">(6)</a> <a href="#ref-for-simulated-xr-device⑥">(7)</a> <a href="#ref-for-simulated-xr-device⑦">(8)</a> <a href="#ref-for-simulated-xr-device⑧">(9)</a>
    <li><a href="#ref-for-simulated-xr-device⑨">4.2. XRTest</a> <a href="#ref-for-simulated-xr-device①⓪">(2)</a> <a href="#ref-for-simulated-xr-device①①">(3)</a> <a href="#ref-for-simulated-xr-device①②">(4)</a>
    <li><a href="#ref-for-simulated-xr-device①③">5.1. FakeXRDevice</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="simulated-xr-device-native-bounds-geometry">
   <b><a href="#simulated-xr-device-native-bounds-geometry">#simulated-xr-device-native-bounds-geometry</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-simulated-xr-device-native-bounds-geometry">4.2. XRTest</a>
    <li><a href="#ref-for-simulated-xr-device-native-bounds-geometry①">5.1. FakeXRDevice</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="simulated-xr-device-floor-origin">
   <b><a href="#simulated-xr-device-floor-origin">#simulated-xr-device-floor-origin</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-simulated-xr-device-floor-origin">4.2. XRTest</a>
    <li><a href="#ref-for-simulated-xr-device-floor-origin①">5.1. FakeXRDevice</a> <a href="#ref-for-simulated-xr-device-floor-origin②">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="simulated-xr-device-viewer-origin">
   <b><a href="#simulated-xr-device-viewer-origin">#simulated-xr-device-viewer-origin</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-simulated-xr-device-viewer-origin">4.2. XRTest</a>
    <li><a href="#ref-for-simulated-xr-device-viewer-origin①">5.1. FakeXRDevice</a> <a href="#ref-for-simulated-xr-device-viewer-origin②">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="simulated-xr-device-emulated-position-boolean">
   <b><a href="#simulated-xr-device-emulated-position-boolean">#simulated-xr-device-emulated-position-boolean</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-simulated-xr-device-emulated-position-boolean">5.1. FakeXRDevice</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="simulated-xr-device-visibility-state">
   <b><a href="#simulated-xr-device-visibility-state">#simulated-xr-device-visibility-state</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-simulated-xr-device-visibility-state">5.1. FakeXRDevice</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="view-device-resolution">
   <b><a href="#view-device-resolution">#view-device-resolution</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-view-device-resolution">4.3. FakeXRDeviceInit</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="view-field-of-view">
   <b><a href="#view-field-of-view">#view-field-of-view</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-view-field-of-view">3. Simulated devices</a> <a href="#ref-for-view-field-of-view①">(2)</a>
    <li><a href="#ref-for-view-field-of-view②">4.3. FakeXRDeviceInit</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xr-test">
   <b><a href="#dom-xr-test">#dom-xr-test</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xr-test">4.1. navigator.xr.test</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrtest">
   <b><a href="#xrtest">#xrtest</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrtest">4.1. navigator.xr.test</a> <a href="#ref-for-xrtest①">(2)</a>
    <li><a href="#ref-for-xrtest②">4.2. XRTest</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrtest-simulatedeviceconnection">
   <b><a href="#dom-xrtest-simulatedeviceconnection">#dom-xrtest-simulatedeviceconnection</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrtest-simulatedeviceconnection">4.2. XRTest</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrtest-simulateuseractivation">
   <b><a href="#dom-xrtest-simulateuseractivation">#dom-xrtest-simulateuseractivation</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrtest-simulateuseractivation">4.2. XRTest</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-xrtest-disconnectalldevices">
   <b><a href="#dom-xrtest-disconnectalldevices">#dom-xrtest-disconnectalldevices</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-xrtest-disconnectalldevices">4.2. XRTest</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dictdef-fakexrdeviceinit">
   <b><a href="#dictdef-fakexrdeviceinit">#dictdef-fakexrdeviceinit</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dictdef-fakexrdeviceinit">4.2. XRTest</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-fakexrdeviceinit-supportsimmersive">
   <b><a href="#dom-fakexrdeviceinit-supportsimmersive">#dom-fakexrdeviceinit-supportsimmersive</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-fakexrdeviceinit-supportsimmersive">4.2. XRTest</a>
    <li><a href="#ref-for-dom-fakexrdeviceinit-supportsimmersive①">4.3. FakeXRDeviceInit</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-fakexrdeviceinit-supportedmodes">
   <b><a href="#dom-fakexrdeviceinit-supportedmodes">#dom-fakexrdeviceinit-supportedmodes</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-fakexrdeviceinit-supportedmodes">4.2. XRTest</a> <a href="#ref-for-dom-fakexrdeviceinit-supportedmodes①">(2)</a>
    <li><a href="#ref-for-dom-fakexrdeviceinit-supportedmodes②">4.3. FakeXRDeviceInit</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-fakexrdeviceinit-views">
   <b><a href="#dom-fakexrdeviceinit-views">#dom-fakexrdeviceinit-views</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-fakexrdeviceinit-views">4.2. XRTest</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-fakexrdeviceinit-supportedfeatures">
   <b><a href="#dom-fakexrdeviceinit-supportedfeatures">#dom-fakexrdeviceinit-supportedfeatures</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-fakexrdeviceinit-supportedfeatures">4.2. XRTest</a> <a href="#ref-for-dom-fakexrdeviceinit-supportedfeatures①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-fakexrdeviceinit-boundscoordinates">
   <b><a href="#dom-fakexrdeviceinit-boundscoordinates">#dom-fakexrdeviceinit-boundscoordinates</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-fakexrdeviceinit-boundscoordinates">4.2. XRTest</a> <a href="#ref-for-dom-fakexrdeviceinit-boundscoordinates①">(2)</a> <a href="#ref-for-dom-fakexrdeviceinit-boundscoordinates②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-fakexrdeviceinit-floororigin">
   <b><a href="#dom-fakexrdeviceinit-floororigin">#dom-fakexrdeviceinit-floororigin</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-fakexrdeviceinit-floororigin">4.2. XRTest</a> <a href="#ref-for-dom-fakexrdeviceinit-floororigin①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-fakexrdeviceinit-viewerorigin">
   <b><a href="#dom-fakexrdeviceinit-viewerorigin">#dom-fakexrdeviceinit-viewerorigin</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-fakexrdeviceinit-viewerorigin">4.2. XRTest</a> <a href="#ref-for-dom-fakexrdeviceinit-viewerorigin①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dictdef-fakexrviewinit">
   <b><a href="#dictdef-fakexrviewinit">#dictdef-fakexrviewinit</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dictdef-fakexrviewinit">4.3. FakeXRDeviceInit</a> <a href="#ref-for-dictdef-fakexrviewinit①">(2)</a>
    <li><a href="#ref-for-dictdef-fakexrviewinit②">5.1. FakeXRDevice</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-fakexrviewinit-eye">
   <b><a href="#dom-fakexrviewinit-eye">#dom-fakexrviewinit-eye</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-fakexrviewinit-eye">4.3. FakeXRDeviceInit</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-fakexrviewinit-projectionmatrix">
   <b><a href="#dom-fakexrviewinit-projectionmatrix">#dom-fakexrviewinit-projectionmatrix</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-fakexrviewinit-projectionmatrix">4.3. FakeXRDeviceInit</a> <a href="#ref-for-dom-fakexrviewinit-projectionmatrix①">(2)</a> <a href="#ref-for-dom-fakexrviewinit-projectionmatrix②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-fakexrviewinit-resolution">
   <b><a href="#dom-fakexrviewinit-resolution">#dom-fakexrviewinit-resolution</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-fakexrviewinit-resolution">4.3. FakeXRDeviceInit</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-fakexrviewinit-viewoffset">
   <b><a href="#dom-fakexrviewinit-viewoffset">#dom-fakexrviewinit-viewoffset</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-fakexrviewinit-viewoffset">4.3. FakeXRDeviceInit</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-fakexrviewinit-fieldofview">
   <b><a href="#dom-fakexrviewinit-fieldofview">#dom-fakexrviewinit-fieldofview</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-fakexrviewinit-fieldofview">4.3. FakeXRDeviceInit</a> <a href="#ref-for-dom-fakexrviewinit-fieldofview①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dictdef-fakexrfieldofviewinit">
   <b><a href="#dictdef-fakexrfieldofviewinit">#dictdef-fakexrfieldofviewinit</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dictdef-fakexrfieldofviewinit">3. Simulated devices</a>
    <li><a href="#ref-for-dictdef-fakexrfieldofviewinit①">4.3. FakeXRDeviceInit</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dictdef-fakexrdeviceresolution">
   <b><a href="#dictdef-fakexrdeviceresolution">#dictdef-fakexrdeviceresolution</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dictdef-fakexrdeviceresolution">3. Simulated devices</a>
    <li><a href="#ref-for-dictdef-fakexrdeviceresolution①">4.3. FakeXRDeviceInit</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dictdef-fakexrboundspoint">
   <b><a href="#dictdef-fakexrboundspoint">#dictdef-fakexrboundspoint</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dictdef-fakexrboundspoint">4.3. FakeXRDeviceInit</a>
    <li><a href="#ref-for-dictdef-fakexrboundspoint①">5.1. FakeXRDevice</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dictdef-fakexrrigidtransforminit">
   <b><a href="#dictdef-fakexrrigidtransforminit">#dictdef-fakexrrigidtransforminit</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dictdef-fakexrrigidtransforminit">3. Simulated devices</a> <a href="#ref-for-dictdef-fakexrrigidtransforminit①">(2)</a>
    <li><a href="#ref-for-dictdef-fakexrrigidtransforminit②">4.3. FakeXRDeviceInit</a> <a href="#ref-for-dictdef-fakexrrigidtransforminit③">(2)</a> <a href="#ref-for-dictdef-fakexrrigidtransforminit④">(3)</a> <a href="#ref-for-dictdef-fakexrrigidtransforminit⑤">(4)</a>
    <li><a href="#ref-for-dictdef-fakexrrigidtransforminit⑥">5.1. FakeXRDevice</a> <a href="#ref-for-dictdef-fakexrrigidtransforminit⑦">(2)</a>
    <li><a href="#ref-for-dictdef-fakexrrigidtransforminit⑧">5.2. FakeXRInputController</a> <a href="#ref-for-dictdef-fakexrrigidtransforminit⑨">(2)</a> <a href="#ref-for-dictdef-fakexrrigidtransforminit①⓪">(3)</a> <a href="#ref-for-dictdef-fakexrrigidtransforminit①①">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-fakexrrigidtransforminit-position">
   <b><a href="#dom-fakexrrigidtransforminit-position">#dom-fakexrrigidtransforminit-position</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-fakexrrigidtransforminit-position">4.3. FakeXRDeviceInit</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-fakexrrigidtransforminit-orientation">
   <b><a href="#dom-fakexrrigidtransforminit-orientation">#dom-fakexrrigidtransforminit-orientation</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-fakexrrigidtransforminit-orientation">4.3. FakeXRDeviceInit</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="parse-a-rigid-transform">
   <b><a href="#parse-a-rigid-transform">#parse-a-rigid-transform</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-parse-a-rigid-transform">4.3. FakeXRDeviceInit</a>
    <li><a href="#ref-for-parse-a-rigid-transform①">5.1. FakeXRDevice</a> <a href="#ref-for-parse-a-rigid-transform②">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="parse-a-view">
   <b><a href="#parse-a-view">#parse-a-view</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-parse-a-view">4.2. XRTest</a> <a href="#ref-for-parse-a-view①">(2)</a>
    <li><a href="#ref-for-parse-a-view②">5.1. FakeXRDevice</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="fakexrdevice">
   <b><a href="#fakexrdevice">#fakexrdevice</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-fakexrdevice">3. Simulated devices</a>
    <li><a href="#ref-for-fakexrdevice①">4.2. XRTest</a> <a href="#ref-for-fakexrdevice②">(2)</a>
    <li><a href="#ref-for-fakexrdevice③">5.1. FakeXRDevice</a> <a href="#ref-for-fakexrdevice④">(2)</a> <a href="#ref-for-fakexrdevice⑤">(3)</a>
    <li><a href="#ref-for-fakexrdevice⑥">6. Hit test extensions</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="fakexrdevice-device">
   <b><a href="#fakexrdevice-device">#fakexrdevice-device</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-fakexrdevice-device">4.2. XRTest</a>
    <li><a href="#ref-for-fakexrdevice-device①">5.1. FakeXRDevice</a> <a href="#ref-for-fakexrdevice-device②">(2)</a> <a href="#ref-for-fakexrdevice-device③">(3)</a> <a href="#ref-for-fakexrdevice-device④">(4)</a> <a href="#ref-for-fakexrdevice-device⑤">(5)</a> <a href="#ref-for-fakexrdevice-device⑥">(6)</a> <a href="#ref-for-fakexrdevice-device⑦">(7)</a> <a href="#ref-for-fakexrdevice-device⑧">(8)</a> <a href="#ref-for-fakexrdevice-device⑨">(9)</a> <a href="#ref-for-fakexrdevice-device①⓪">(10)</a> <a href="#ref-for-fakexrdevice-device①①">(11)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="xrsession-next-animation-frame">
   <b><a href="#xrsession-next-animation-frame">#xrsession-next-animation-frame</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-xrsession-next-animation-frame">5.1. FakeXRDevice</a> <a href="#ref-for-xrsession-next-animation-frame①">(2)</a> <a href="#ref-for-xrsession-next-animation-frame②">(3)</a> <a href="#ref-for-xrsession-next-animation-frame③">(4)</a> <a href="#ref-for-xrsession-next-animation-frame④">(5)</a> <a href="#ref-for-xrsession-next-animation-frame⑤">(6)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-fakexrdevice-setviews">
   <b><a href="#dom-fakexrdevice-setviews">#dom-fakexrdevice-setviews</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-fakexrdevice-setviews">5.1. FakeXRDevice</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-fakexrdevice-disconnect">
   <b><a href="#dom-fakexrdevice-disconnect">#dom-fakexrdevice-disconnect</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-fakexrdevice-disconnect">5.1. FakeXRDevice</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-fakexrdevice-setviewerorigin">
   <b><a href="#dom-fakexrdevice-setviewerorigin">#dom-fakexrdevice-setviewerorigin</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-fakexrdevice-setviewerorigin">5.1. FakeXRDevice</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-fakexrdevice-clearviewerorigin">
   <b><a href="#dom-fakexrdevice-clearviewerorigin">#dom-fakexrdevice-clearviewerorigin</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-fakexrdevice-clearviewerorigin">5.1. FakeXRDevice</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-fakexrdevice-simulatevisibilitychange">
   <b><a href="#dom-fakexrdevice-simulatevisibilitychange">#dom-fakexrdevice-simulatevisibilitychange</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-fakexrdevice-simulatevisibilitychange">5.1. FakeXRDevice</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-fakexrdevice-setfloororigin">
   <b><a href="#dom-fakexrdevice-setfloororigin">#dom-fakexrdevice-setfloororigin</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-fakexrdevice-setfloororigin">5.1. FakeXRDevice</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-fakexrdevice-clearfloororigin">
   <b><a href="#dom-fakexrdevice-clearfloororigin">#dom-fakexrdevice-clearfloororigin</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-fakexrdevice-clearfloororigin">5.1. FakeXRDevice</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-fakexrdevice-setboundsgeometry">
   <b><a href="#dom-fakexrdevice-setboundsgeometry">#dom-fakexrdevice-setboundsgeometry</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-fakexrdevice-setboundsgeometry">5.1. FakeXRDevice</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-fakexrdevice-simulateresetpose">
   <b><a href="#dom-fakexrdevice-simulateresetpose">#dom-fakexrdevice-simulateresetpose</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-fakexrdevice-simulateresetpose">5.1. FakeXRDevice</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dictdef-fakexrinputsourceinit">
   <b><a href="#dictdef-fakexrinputsourceinit">#dictdef-fakexrinputsourceinit</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dictdef-fakexrinputsourceinit">5.1. FakeXRDevice</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="fakexrinputcontroller">
   <b><a href="#fakexrinputcontroller">#fakexrinputcontroller</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-fakexrinputcontroller">5.1. FakeXRDevice</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="enumdef-fakexrbuttontype">
   <b><a href="#enumdef-fakexrbuttontype">#enumdef-fakexrbuttontype</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-enumdef-fakexrbuttontype">5.2. FakeXRInputController</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dictdef-fakexrbuttonstateinit">
   <b><a href="#dictdef-fakexrbuttonstateinit">#dictdef-fakexrbuttonstateinit</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dictdef-fakexrbuttonstateinit">5.2. FakeXRInputController</a> <a href="#ref-for-dictdef-fakexrbuttonstateinit①">(2)</a> <a href="#ref-for-dictdef-fakexrbuttonstateinit②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dictdef-fakexrworldinit">
   <b><a href="#dictdef-fakexrworldinit">#dictdef-fakexrworldinit</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dictdef-fakexrworldinit">4.3. FakeXRDeviceInit</a>
    <li><a href="#ref-for-dictdef-fakexrworldinit①">5.1. FakeXRDevice</a>
    <li><a href="#ref-for-dictdef-fakexrworldinit②">6. Hit test extensions</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-fakexrworldinit-hittestregions">
   <b><a href="#dom-fakexrworldinit-hittestregions">#dom-fakexrworldinit-hittestregions</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-fakexrworldinit-hittestregions">6. Hit test extensions</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dictdef-fakexrregioninit">
   <b><a href="#dictdef-fakexrregioninit">#dictdef-fakexrregioninit</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dictdef-fakexrregioninit">6. Hit test extensions</a> <a href="#ref-for-dictdef-fakexrregioninit①">(2)</a> <a href="#ref-for-dictdef-fakexrregioninit②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-fakexrregioninit-faces">
   <b><a href="#dom-fakexrregioninit-faces">#dom-fakexrregioninit-faces</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-fakexrregioninit-faces">6. Hit test extensions</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-fakexrregioninit-type">
   <b><a href="#dom-fakexrregioninit-type">#dom-fakexrregioninit-type</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-fakexrregioninit-type">6. Hit test extensions</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dictdef-fakexrtriangleinit">
   <b><a href="#dictdef-fakexrtriangleinit">#dictdef-fakexrtriangleinit</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dictdef-fakexrtriangleinit">6. Hit test extensions</a> <a href="#ref-for-dictdef-fakexrtriangleinit①">(2)</a> <a href="#ref-for-dictdef-fakexrtriangleinit②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-fakexrtriangleinit-vertices">
   <b><a href="#dom-fakexrtriangleinit-vertices">#dom-fakexrtriangleinit-vertices</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-fakexrtriangleinit-vertices">6. Hit test extensions</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="enumdef-fakexrregiontype">
   <b><a href="#enumdef-fakexrregiontype">#enumdef-fakexrregiontype</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-enumdef-fakexrregiontype">6. Hit test extensions</a> <a href="#ref-for-enumdef-fakexrregiontype①">(2)</a>
   </ul>
  </aside>
<script>/* script-var-click-highlighting */

    document.addEventListener("click", e=>{
        if(e.target.nodeName == "VAR") {
            highlightSameAlgoVars(e.target);
        }
    });
    {
        const indexCounts = new Map();
        const indexNames = new Map();
        function highlightSameAlgoVars(v) {
            // Find the algorithm container.
            let algoContainer = null;
            let searchEl = v;
            while(algoContainer == null && searchEl != document.body) {
                searchEl = searchEl.parentNode;
                if(searchEl.hasAttribute("data-algorithm")) {
                    algoContainer = searchEl;
                }
            }

            // Not highlighting document-global vars,
            // too likely to be unrelated.
            if(algoContainer == null) return;

            const algoName = algoContainer.getAttribute("data-algorithm");
            const varName = getVarName(v);
            const addClass = !v.classList.contains("selected");
            let highlightClass = null;
            if(addClass) {
                const index = chooseHighlightIndex(algoName, varName);
                indexCounts.get(algoName)[index] += 1;
                indexNames.set(algoName+"///"+varName, index);
                highlightClass = nameFromIndex(index);
            } else {
                const index = previousHighlightIndex(algoName, varName);
                indexCounts.get(algoName)[index] -= 1;
                highlightClass = nameFromIndex(index);
            }

            // Find all same-name vars, and toggle their class appropriately.
            for(const el of algoContainer.querySelectorAll("var")) {
                if(getVarName(el) == varName) {
                    el.classList.toggle("selected", addClass);
                    el.classList.toggle(highlightClass, addClass);
                }
            }
        }
        function getVarName(el) {
            return el.textContent.replace(/(\s| )+/, " ").trim();
        }
        function chooseHighlightIndex(algoName, varName) {
            let indexes = null;
            if(indexCounts.has(algoName)) {
                indexes = indexCounts.get(algoName);
            } else {
                // 7 classes right now
                indexes = [0,0,0,0,0,0,0];
                indexCounts.set(algoName, indexes);
            }

            // If the element was recently unclicked,
            // *and* that color is still unclaimed,
            // give it back the same color.
            const lastIndex = previousHighlightIndex(algoName, varName);
            if(indexes[lastIndex] === 0) return lastIndex;

            // Find the earliest index with the lowest count.
            const minCount = Math.min.apply(null, indexes);
            let index = null;
            for(var i = 0; i < indexes.length; i++) {
                if(indexes[i] == minCount) {
                    return i;
                }
            }
        }
        function previousHighlightIndex(algoName, varName) {
            return indexNames.get(algoName+"///"+varName);
        }
        function nameFromIndex(index) {
            return "selected" + index;
        }
    }
    </script>
<script>/* script-dfn-panel */

document.body.addEventListener("click", function(e) {
    var queryAll = function(sel) { return [].slice.call(document.querySelectorAll(sel)); }
    // Find the dfn element or panel, if any, that was clicked on.
    var el = e.target;
    var target;
    var hitALink = false;
    while(el.parentElement) {
        if(el.tagName == "A") {
            // Clicking on a link in a <dfn> shouldn't summon the panel
            hitALink = true;
        }
        if(el.classList.contains("dfn-paneled")) {
            target = "dfn";
            break;
        }
        if(el.classList.contains("dfn-panel")) {
            target = "dfn-panel";
            break;
        }
        el = el.parentElement;
    }
    if(target != "dfn-panel") {
        // Turn off any currently "on" or "activated" panels.
        queryAll(".dfn-panel.on, .dfn-panel.activated").forEach(function(el){
            el.classList.remove("on");
            el.classList.remove("activated");
        });
    }
    if(target == "dfn" && !hitALink) {
        // open the panel
        var dfnPanel = document.querySelector(".dfn-panel[data-for='" + el.id + "']");
        if(dfnPanel) {
            dfnPanel.classList.add("on");
            var rect = el.getBoundingClientRect();
            dfnPanel.style.left = window.scrollX + rect.right + 5 + "px";
            dfnPanel.style.top = window.scrollY + rect.top + "px";
            var panelRect = dfnPanel.getBoundingClientRect();
            var panelWidth = panelRect.right - panelRect.left;
            if(panelRect.right > document.body.scrollWidth && (rect.left - (panelWidth + 5)) > 0) {
                // Reposition, because the panel is overflowing
                dfnPanel.style.left = window.scrollX + rect.left - (panelWidth + 5) + "px";
            }
        } else {
            console.log("Couldn't find .dfn-panel[data-for='" + el.id + "']");
        }
    } else if(target == "dfn-panel") {
        // Switch it to "activated" state, which pins it.
        el.classList.add("activated");
        el.style.left = null;
        el.style.top = null;
    }

});
</script>